public static BackupTask OpenAddBackupTaskWizard(ProgramOptions options, bool runFormAsApplication) { var controller = new AddBackupTaskWizardController(options); using (var form = new AddBackupTaskWizardForm(controller)) { if (runFormAsApplication) { Application.Run(form); } else { form.ShowDialog(); } if (form.DialogResult == DialogResult.OK && !runFormAsApplication) { return(controller.Task); } } if (runFormAsApplication) { Environment.Exit(0); } return(null); }
internal AddBackupTaskWizardForm(AddBackupTaskWizardController controller) { _controller = controller; InitializeComponent(); _controller.AddBackupTaskWizardView.Configure(); _controller.AddBackupTaskWizardView.ApplyLocalization(); ApplyLocals(); RefreshActivePage(); }