/// <summary> /// Handles a keyboard press event in tree view. /// </summary> protected void XmlElementTreeViewKeyPressed(object source, XmlTreeViewKeyPressedEventArgs e) { if (e.KeyData == Keys.Delete) { Delete(); } else if (e.KeyData == (Keys.Control | Keys.C)) { Copy(); } else if (e.KeyData == (Keys.Control | Keys.X)) { Cut(); } else if (e.KeyData == (Keys.Control | Keys.V)) { Paste(); } else if (e.KeyData == (Keys.Control | Keys.A)) { SelectAll(); } }
/// <summary> /// Handles a keyboard press event in tree view. /// </summary> protected void XmlElementTreeViewKeyPressed(object source, XmlTreeViewKeyPressedEventArgs e) { if (e.KeyData == Keys.Delete) Delete(); else if (e.KeyData == (Keys.Control | Keys.C)) Copy(); else if (e.KeyData == (Keys.Control | Keys.X)) Cut(); else if (e.KeyData == (Keys.Control | Keys.V)) Paste(); else if (e.KeyData == (Keys.Control | Keys.A)) SelectAll(); }