public void ExecuteStateExport(ICommandContext context) { using (var dialog = new SaveStateDialog()) { if (dialog.ShowDialog( context .GetRequiredService <IUIShell>() .GetMainWindowParent()) != DialogResult.OK) { return; } ProgressWorker.Run(context, false, pi => new StateObject(context, dialog.FileName).SaveState(dialog.Options)); } }
public void ExecuteStateExport(ICommandContext context) { using (var dialog = new SaveStateDialog()) { if (dialog.ShowDialog( context .GetRequiredService<IUIShell>() .GetMainWindowParent()) != DialogResult.OK) return; ProgressWorker.Run(context, false, pi => new StateObject(context, dialog.FileName).SaveState(dialog.Options)); } }