VsShellUtilities.PromptYesNo(String, String, OLEMSGICON, IVsUIShell) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
显示一个消息框,其中包含指定的标题,并提示用户对指定的消息 ("是" 或 "否") 响应。
public:
static bool PromptYesNo(System::String ^ message, System::String ^ title, Microsoft::VisualStudio::Shell::Interop::OLEMSGICON icon, Microsoft::VisualStudio::Shell::Interop::IVsUIShell ^ uiShell);
public:
static bool PromptYesNo(Platform::String ^ message, Platform::String ^ title, Microsoft::VisualStudio::Shell::Interop::OLEMSGICON icon, Microsoft::VisualStudio::Shell::Interop::IVsUIShell ^ uiShell);
static bool PromptYesNo(std::wstring const & message, std::wstring const & title, Microsoft::VisualStudio::Shell::Interop::OLEMSGICON icon, Microsoft::VisualStudio::Shell::Interop::IVsUIShell const & uiShell);
public static bool PromptYesNo (string message, string title, Microsoft.VisualStudio.Shell.Interop.OLEMSGICON icon, Microsoft.VisualStudio.Shell.Interop.IVsUIShell uiShell);
static member PromptYesNo : string * string * Microsoft.VisualStudio.Shell.Interop.OLEMSGICON * Microsoft.VisualStudio.Shell.Interop.IVsUIShell -> bool
Public Shared Function PromptYesNo (message As String, title As String, icon As OLEMSGICON, uiShell As IVsUIShell) As Boolean
Public Function PromptYesNo (message As String, title As String, icon As OLEMSGICON, uiShell As IVsUIShell) As Boolean
参数
- message
- String
要显示的消息。
- title
- String
消息框的标题。
- icon
- OLEMSGICON
要在消息框上显示的图标。
- uiShell
- IVsUIShell
对 IVsUIShell 接口的引用。
返回
如果结果为 Yes,则返回 true,否则返回 false。