Exemple #1
0
        private void processKbdCtrlShortcuts(object sender, KeyEventArgs e)
        {
            TextBoxBase t = (TextBoxBase)sender;

            if (e.KeyData == (Keys.C | Keys.Control))
            {
                t.Copy();
                e.Handled = true;
            }
            else if (e.KeyData == (Keys.X | Keys.Control))
            {
                t.Cut();
                e.Handled = true;
            }
            else if (e.KeyData == (Keys.V | Keys.Control))
            {
                t.Paste();
                e.Handled = true;
            }
            else if (e.KeyData == (Keys.A | Keys.Control))
            {
                t.SelectAll();
                e.Handled = true;
            }
            else if (e.KeyData == (Keys.Z | Keys.Control))
            {
                t.Undo();
                e.Handled = true;
            }
        }
Exemple #2
0
        // Perform the command associated with MenuIndex on the specified TextBoxBase.
        private void DoTextBoxCommand(TextBoxBase textbox, MenuIndex menuIndex)
        {
            switch (menuIndex)
            {
            case MenuIndex.Undo:            textbox.Undo();                         break;

            case MenuIndex.Redo:
                if (textbox is RichTextBox)
                {
                    RichTextBox rt = (RichTextBox)textbox;
                    rt.Redo();
                }
                break;

            case MenuIndex.Cut:                     textbox.Cut();                          break;

            case MenuIndex.Copy:            textbox.Copy();                         break;

            case MenuIndex.Paste:           textbox.Paste();                        break;

            case MenuIndex.Delete:          textbox.SelectedText = "";      break;

            case MenuIndex.SelectAll:       textbox.SelectAll();            break;

            case MenuIndex.Properties:                                                              break;
            }
        }
Exemple #3
0
 private void copyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (ActiveControl is TextBoxBase)
     {
         TextBoxBase tb = (TextBoxBase)ActiveControl;
         tb.Copy();
     }
 }
Exemple #4
0
        public void Copy()
        {
            TextBoxBase textBox = FindFocusedTextBox();

            if (textBox != null)
            {
                textBox.Copy();
            }
        }
Exemple #5
0
 public void Copy()
 {
     if (isFc)
     {
         fc.Copy();
     }
     else
     {
         tb.Copy();
     }
 }
 public void Copy()
 {
     textBox.Copy();
 }
Exemple #7
0
 // Token: 0x060002FE RID: 766 RVA: 0x0000338F File Offset: 0x0000158F
 static void smethod_19(TextBoxBase textBoxBase_0)
 {
     textBoxBase_0.Copy();
 }