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

Published on:

LanguageCSharp
LicenseMIT_X11
OSWindows

GetShowMessageBoxYes: 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/293033/GetShowMessageBoxYes--Get-an-IVsUiShell-?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 GetShowMessageBoxYes() { BaseMock uiShell = GetUiShellInstance(); string name = string.Format("{0}.{1}", typeof(IVsUIShell).FullName, "ShowMessageBox"); uiShell.AddMethodCallback(name, new EventHandler<CallbackArgs>(ShowMessageBoxYes)); return uiShell; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus