public static void SafeClose(this IWizardShell shell)
 {
     try
     {
         (shell as Window)?.Close();
     }
     catch (Exception)
     {
     }
 }
예제 #2
0
        private UserSelection StartWizard(IWizardShell wizardShell, WizardTypeEnum wizardType)
        {
            try
            {
                CleanStatusBar();
                var userSelection = LaunchWizardShell(wizardShell);
                SendTelemetry(wizardType, userSelection);

                if (userSelection != null)
                {
                    return(userSelection);
                }
            }
            catch (Exception ex) when(!(ex is WizardBackoutException))
            {
                (wizardShell as IWindow).SafeClose();
                _dialogService.ShowError(ex);
            }

            CancelWizard();
            return(null);
        }
예제 #3
0
 private UserSelection LaunchWizardShell(IWizardShell wizardShell)
 {
     GenContext.ToolBox.Shell.ShowModal(wizardShell as IWindow);
     return(wizardShell.Result);
 }