Inheritance: System.Windows.Forms.Form
示例#1
0
        public void ExecuteStateImport(ICommandContext context)
        {
            using (var dialog = new RestoreStateDialog())
            {
                if (dialog.ShowDialog(context.GetRequiredService <IUIShell>().GetMainWindowParent()) != DialogResult.OK)
                {
                    return;
                }

                ProgressWorker.Run(
                    context,
                    false,
                    pi => new StateObject(context, dialog.FileName).RestoreState(dialog.Options));
            }
        }
示例#2
0
        public void ExecuteStateImport(ICommandContext context)
        {
            using (var dialog = new RestoreStateDialog())
            {
                if (dialog.ShowDialog(context.GetRequiredService<IUIShell>().GetMainWindowParent()) != DialogResult.OK)
                    return;

                ProgressWorker.Run(
                    context,
                    false,
                    pi => new StateObject(context, dialog.FileName).RestoreState(dialog.Options));
            }
        }