ThreadedWaitDialogHelper.StartWaitDialog 方法

定义

显示线程等待对话框,并将其连接到接收进度更新 IProgress<T> ,并通过报告取消 CancellationToken

public static Microsoft.VisualStudio.Shell.ThreadedWaitDialogHelper.Session StartWaitDialog (this Microsoft.VisualStudio.Shell.Interop.IVsThreadedWaitDialogFactory dialogFactory, string waitCaption, Microsoft.VisualStudio.Shell.ThreadedWaitDialogProgressData initialProgress = default, TimeSpan delayToShowDialog = default);
static member StartWaitDialog : Microsoft.VisualStudio.Shell.Interop.IVsThreadedWaitDialogFactory * string * Microsoft.VisualStudio.Shell.ThreadedWaitDialogProgressData * TimeSpan -> Microsoft.VisualStudio.Shell.ThreadedWaitDialogHelper.Session
<Extension()>
Public Function StartWaitDialog (dialogFactory As IVsThreadedWaitDialogFactory, waitCaption As String, Optional initialProgress As ThreadedWaitDialogProgressData = Nothing, Optional delayToShowDialog As TimeSpan = Nothing) As ThreadedWaitDialogHelper.Session

参数

dialogFactory
IVsThreadedWaitDialogFactory

用于显示 "等待" 对话框的对话框工厂。

waitCaption
String

对话框的标题。

initialProgress
ThreadedWaitDialogProgressData

对话框的初始进度数据。

delayToShowDialog
TimeSpan

对话框变为可见之前的延迟。 分辨率限制为秒。

返回

ThreadedWaitDialogHelper.Session

一个 ThreadedWaitDialogHelper.Session 实例,该实例可用于向对话框报告进度并检查用户是否取消了操作。 对 Dispose() 返回的值调用以关闭对话框。

适用于