示例#1
0
        static void OnCommandInputFormClosing(object sender, FormClosingEventArgs e)
        {
            if (!_commandInputForm.Canceled)
                ExecuteCommand(_commandInputForm.Command, _commandInputForm.Arguments);

            _commandInputForm.FormClosing -= new FormClosingEventHandler(OnCommandInputFormClosing);
            _commandInputForm = null;
        }
示例#2
0
 static void OnCapsKeyDown(KeyHookEventArgs e)
 {
     if (_commandInputForm == null)
     {
         _commandInputForm = new CommandInputForm(_commandProvider, _commandHistory);
         _commandInputForm.FormClosing += new FormClosingEventHandler(OnCommandInputFormClosing);
         _commandInputForm.Show();
     }
     else
     {
         _commandInputForm.Cancel();
     }
 }