コード例 #1
0
ファイル: Program.cs プロジェクト: schmich/ephemeral
        static void OnCommandInputFormClosing(object sender, FormClosingEventArgs e)
        {
            if (!_commandInputForm.Canceled)
                ExecuteCommand(_commandInputForm.Command, _commandInputForm.Arguments);

            _commandInputForm.FormClosing -= new FormClosingEventHandler(OnCommandInputFormClosing);
            _commandInputForm = null;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: schmich/ephemeral
 static void OnCapsKeyDown(KeyHookEventArgs e)
 {
     if (_commandInputForm == null)
     {
         _commandInputForm = new CommandInputForm(_commandProvider, _commandHistory);
         _commandInputForm.FormClosing += new FormClosingEventHandler(OnCommandInputFormClosing);
         _commandInputForm.Show();
     }
     else
     {
         _commandInputForm.Cancel();
     }
 }