public DialogResult RunInitDialog() { Verify.State.IsTrue(IsLoaded, string.Format("{0} is not loaded.", GetType().FullName)); DialogResult res; string path = ""; using (var dlg = new InitDialog(this)) { dlg.RepositoryPath.Value = _environment.RecentRepositoryPath; res = dlg.Run(_environment.MainForm); if (res == DialogResult.OK) { path = Path.GetFullPath(dlg.RepositoryPath.Value); } } if (res == DialogResult.OK) { _environment.OpenRepository(path); } return(res); }
protected virtual void OnInitDialog(OpenFileDialog openFileDialog) => InitDialog?.Invoke(this, new InitDialogEventArgs(openFileDialog));
private void OnInitialize(InitDialog parameter) { UI.Unsubscribe <InitDialog>(OnInitialize); OnNavigatedTo(parameter.Payload); }