示例#1
0
        internal void RestartApplicationWithConfirm()
        {
            var restart = MessageBoxFactory.ShowYesNo("Requested operation has been completed. irAuthor must be restarted before your changes can take effect. Would you like to restart irAuthor now?", "Restart needed", MessageBoxFactoryImage.Question, ExtensionBrowserView);

            if (!restart)
            {
                return;
            }

            // If a ruleapp is loaded, give them the opportunity to save it or cancel.
            if (RuleApplicationService.RuleApplicationDef != null)
            {
                restart = RuleApplicationService.Close();
            }

            if (!restart)
            {
                return;
            }

            Process.Start(Application.ResourceAssembly.Location);

            IrAuthorShell.Exit();
        }