コード例 #1
0
ファイル: ForBlock.cs プロジェクト: orb1t/StructuredEditor
 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;
     }
 }
コード例 #2
0
ファイル: ForBlock.cs プロジェクト: orb1t/StructuredEditor
 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;
     }
 }