private void Editor_KeyUp(object sender, KeyEventArgs e) { try { if (AutoComplete) { if (e.Control) { switch (e.KeyCode) { case Keys.Space: // Remove the space that has just been added EditionTextBox.Select(EditionTextBox.SelectionStart - 1, 1); EditionTextBox.SelectedText = ""; DisplayComboBox(); e.Handled = true; break; case Keys.I: // Remove the space that has just been added EditionTextBox.Select(EditionTextBox.SelectionStart - 1, 1); EditionTextBox.SelectedText = ""; EditionTextBox.Indent(); e.Handled = true; break; } } } } catch (Exception) { } if (!e.Handled) { if (e.Control) { switch (e.KeyCode) { case Keys.A: EditionTextBox.SelectAll(); e.Handled = true; break; case Keys.C: EditionTextBox.Copy(); e.Handled = true; break; case Keys.V: e.Handled = true; break; } } } }
public void Copy() { EditionTextBox.Copy(); }