Exemplo n.º 1
0
 void ForCondition_PreviewKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
 {
     if (e.KeyChar == ';')
     {
         ForIncrementStep.SetCursorToTheBeginning();
         e.Handled = true;
     }
     if (e.KeyChar == ' ' && ForCondition.MyTextBox.CaretIsAtBeginning)
     {
         e.Handled = true;
     }
 }
Exemplo n.º 2
0
 void mForCondition_KeyDown(Block block, System.Windows.Forms.KeyEventArgs e)
 {
     if (e.KeyCode == System.Windows.Forms.Keys.Tab)
     {
         ForIncrementStep.SetFocus();
         e.Handled = true;
     }
     if (e.KeyCode == System.Windows.Forms.Keys.Back)
     {
         ForInitializer.SetCursorToTheEnd();
         e.Handled = true;
     }
     if (e.KeyCode == System.Windows.Forms.Keys.Delete && ForCondition.MyTextBox.CaretIsAtEnd)
     {
         ForIncrementStep.SetCursorToTheBeginning();
         e.Handled = true;
     }
 }