예제 #1
0
 private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.Equals(Keys.Z))
     {
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.UndoWords();
         e.Handled = true;
     }
     if (e.Equals(Keys.Y))
     {
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.RedoWords();
         e.Handled = true;
     }
 }
예제 #2
0
 protected void textBox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     if (e.Modifiers == Keys.Control)
     {
         //if (e.KeyCode == Keys.Z)
         //{
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.UndoWords();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.Escape)
     {
         Undoer undoer = null;
         foreach (var x in dictionary)
         {
             if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
             {
                 undoer = x.Value;
             }
         }
         undoer.RedoWords();
         e.Handled = true;
     }
 }
예제 #3
0
 private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Modifiers == (System.Windows.Forms.Keys.Control))
     {
         if (e.KeyCode == Keys.Z)
         {
             Undoer undoer = null;
             foreach (var x in dictionary)
             {
                 if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
                 {
                     undoer = x.Value;
                 }
             }
             undoer.UndoWords();
             e.Handled = true;
         }
         if (e.KeyCode == Keys.Y)
         {
             Undoer undoer = null;
             foreach (var x in dictionary)
             {
                 if (x.Key.Equals(tabFiles.SelectedTab.Controls[1]))
                 {
                     undoer = x.Value;
                 }
             }
             undoer.RedoWords();
             e.Handled = true;
         }
     }
 }