Beispiel #1
0
 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
 }
Beispiel #2
0
 protected void RaiseChooseNewContentFormatEvent(ChooseNewContentFormatEventArgs e)
 {
     OnChooseNewContentFormat(e);
     if (ChooseNewContentFormat != null)
     {
         ChooseNewContentFormat(this, e);
     }
 }
Beispiel #3
0
 protected virtual void OnChooseNewContentFormat(ChooseNewContentFormatEventArgs e)
 {
 }