Ejemplo n.º 1
0
 protected virtual void OnInputDetected(InputDetectedEventArgs e)
 {
     EventHandler<InputDetectedEventArgs> handler = InputDetected;
     if (handler != null)
     {
         handler (this, e);
     }
 }
Ejemplo n.º 2
0
        public void triggerInputEvent(KeyEventArgs keyEvent)
        {
            if (keyEvent.KeyCode == Keys.Return)
            {
                // Check if no answer was entered.
                if (inputMaskedTextBox.Text == "")
                {
                    messageLabel.Text = "Oops! You forgot to enter an answer!";
                }
                else
                {
                    InputDetectedEventArgs args = new InputDetectedEventArgs ();
                    args.input = inputMaskedTextBox.Text;
                    //args.TimeReached = DateTime.Now;
                    OnInputDetected (args);
                }
            }

            // The event was triggered by input being entered. Clear the status area of messages.
            else
            {
                messageLabel.Text = "";
            }
        }
Ejemplo n.º 3
0
 static void c_InputDetected(object sender, InputDetectedEventArgs e)
 {
     ((MathFactsForm) m_factsDisplayControl.FindForm ()).processInput ();
 }