コード例 #1
0
 /// <summary>
 /// Opens the Options form with the specified owner window.
 /// </summary>
 /// <param name="owner">Owner window.</param>
 /// <returns>DialogResult of the OptionsForm.</returns>
 public static DialogResult Execute(IWin32Window owner)
 {
     DialogResult result;
     using (OptionsForm optionsForm = new OptionsForm())
     {
         result = optionsForm.ShowDialog(owner);
     }
     return result;
 }
コード例 #2
0
 private void ShowOptionsWindow()
 {
     // The command gateway has to be suspended because otherwise it might be impossible to edit the magic keystrokes.
     commandGateway.IsEnabled = false;
     cmiTrayOptions.Enabled   = false;
     try
     {
         ExecuteActionWithFocusLostEventLock(() => OptionsForm.Execute(this));
         UpdateKeyboardShortcutDependentControls();
         trayIcon.Visible = UserSettings.Instance.ShowIconInSystemTray;
     }
     finally
     {
         commandGateway.IsEnabled = true;
         cmiTrayOptions.Enabled   = true;
     }
 }