本文整理匯總了C#中XenAdmin.Dialogs.ActionProgressDialog.Close方法的典型用法代碼示例。如果您正苦於以下問題:C# ActionProgressDialog.Close方法的具體用法?C# ActionProgressDialog.Close怎麽用?C# ActionProgressDialog.Close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenAdmin.Dialogs.ActionProgressDialog
的用法示例。
在下文中一共展示了ActionProgressDialog.Close方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ExecuteCore
protected override void ExecuteCore(SelectedItemCollection selection)
{
ApplyLicenseEditionAction action = new ApplyLicenseEditionAction(xos, _edition, _licenseServerAddress, _licenseServerPort, null);
ActionProgressDialog actionProgress = new ActionProgressDialog(action, ProgressBarStyle.Marquee);
// close dialog even when there's an error as this action shows its own error dialog box.
action.Completed += s =>
{
Program.Invoke(Program.MainWindow, () =>
{
Failure f = action.Exception as Failure;
if (f != null && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED_FRIENDLY)
return;
actionProgress.Close();
});
if (action.Exception != null)
{
ShowLicensingFailureDialog(action.LicenseFailures, action.Exception.Message, Parent);
}
};
actionProgress.ShowDialog(Parent);
if (actionProgress.action.Succeeded)
{
InvokeSuccedded(null);
}
}