private void base_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e) { //TODO : it's better to show a message if readonly if (m_NotepadXDocument.IsReadonly == false) { //System.Diagnostics.Debug.WriteLine ("KeyUp fired"); if (e.KeyCode == Keys.F2) { StartNodeTitleEdit(this.SelectedNode); } else if (e.KeyCode == Keys.Insert) { ChooseNewContentFormatEventArgs newNoteFormatEventArgs = new ChooseNewContentFormatEventArgs(e); RaiseChooseNewContentFormatEvent(newNoteFormatEventArgs); AddNewChildNoteForSelectedNode(newNoteFormatEventArgs.SelectedNewContentFormat); } else if (e.KeyCode == Keys.Delete) { RemoveNoteForSelectedNote(); } } else { }; //ignore keystroks in read-only mode }
protected void RaiseChooseNewContentFormatEvent(ChooseNewContentFormatEventArgs e) { OnChooseNewContentFormat(e); if (ChooseNewContentFormat != null) { ChooseNewContentFormat(this, e); } }
protected virtual void OnChooseNewContentFormat(ChooseNewContentFormatEventArgs e) { }