Ejemplo n.º 1
0
        /// <summary>
        /// If the button command begins with an @, it could either
        /// be a virtual key defined in the .NET class Keys, or
        /// it could be a command
        /// If is a command, the form is notified and it's handled there
        /// </summary>
        /// <param name="modifiers"></param>
        /// <param name="value"></param>
        /// <param name="isVirtualKey"></param>
        private void actuateSpecialKey(ArrayList modifiers, String value, bool isVirtualKey)
        {
            Log.Debug("command=" + value + " isVirtualKey=" + isVirtualKey.ToString());

            if (isVirtualKey)
            {
                Keys key = TextController.MapVirtualKey(value);
                if (key == Keys.Escape && Context.AppTalkWindowManager.IsTalkWindowVisible)
                {
                    Context.AppTalkWindowManager.CloseTalkWindow();
                }
                else if (key == Keys.Escape && _dialogMode)
                {
                    ScannerForm.Close();
                }
                else
                {
                    TextController.HandleVirtualKey(modifiers, value);
                }
            }
            else
            {
                // this is a command.
                runCommand(value);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// The interpreter invoked a "close" command.  Close
 /// the scanner
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void Interpreter_EvtCloseNotify(object sender, InterpreterEventArgs e)
 {
     ScannerForm.Invoke(new MethodInvoker(delegate
     {
         Log.Debug("Calling close for " + ScannerForm.Name);
         ScannerForm.Close();
     }));
 }