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