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)); } }
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)); } }