by
0
5
1,278
0
Top 1% !
Famous
Easy-to-find
Specified
OpenSource
Popularity: 17697th place

Published on:

LanguageCSharp
LicenseMIT_X11
OSWindows

GetShowMessageBoxCancel: Get an IVsUiShell that implement ShowMessageBox and returns Cancel from pressing the buttons

<summary>
         Get an IVsUiShell that implement ShowMessageBox and returns Cancel from pressing the buttons
		 </summary>
		 <returns></returns>
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/293032/GetShowMessageBoxCancel--Get-an-IVsUiShe?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VsSDK.UnitTestLibrary; using Microsoft.VisualStudio; using Microsoft.Samples.VisualStudio.SourceControlIntegration.SccProvider; /// <summary> /// Get an IVsUiShell that implement ShowMessageBox and returns Cancel from pressing the buttons /// </summary> /// <returns></returns> internal static BaseMock GetShowMessageBoxCancel() { BaseMock uiShell = GetUiShellInstance(); string name = string.Format("{0}.{1}", typeof(IVsUIShell).FullName, "ShowMessageBox"); uiShell.AddMethodCallback(name, new EventHandler<CallbackArgs>(ShowMessageBoxCancel)); return uiShell; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus