protected override void OnExecuted(EventArgs e) { base.OnExecuted(e); var form = (MainForm)Application.Instance.MainForm; var dialog = new Dialogs.Preferences { Folder = Notedown.Preferences.Folder }; if (dialog.ShowModal(Application.Instance.MainForm)) { Notedown.Preferences.Folder = dialog.Folder; Notedown.Preferences.Save(); form.Update(); } }
protected override void OnActivated(EventArgs e) { base.OnActivated(e); var form = (MainForm)Application.Instance.MainForm; var dialog = new Dialogs.Preferences(); dialog.ShowDialog(Application.Instance.MainForm); if (dialog.DialogResult == DialogResult.Ok) { Notedown.Preferences.Folder = dialog.TextBoxFolder.Text; Notedown.Preferences.Save(); form.Update(); } }