Esempio n. 1
0
 private void SaveDocument(object sender, EventArgs e)
 {
     if (!switchingDoc)
     {
         CurrentNode?.Doc.Save(Title_TXT.Text, Paragraph_TXT.Text);
         if (sender.Equals(Title_TXT))
         {
             if (CurrentNode != null)
             {
                 CurrentNode.Text = "*" + CurrentNode.Doc.Title + "*";
             }
         }
         if (KeyPressed)
         {
             KeyPressed = false;
             UndoRedo.Do(new TextEditor(sender as Control, prevText, (sender as Control).Text));
         }
     }
     else
     {
         switchingDoc = false;
     }
 }
Esempio n. 2
0
 private void Title_TXT_Leave(object sender, EventArgs e)
 {
     UndoRedo.Do(new TextEditor(sender as Control, prevText, (sender as Control).Text));
 }
Esempio n. 3
0
 private void currentDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UndoRedo.Do(new Commands.AddDocument(null));
 }
Esempio n. 4
0
 private void subDocumentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UndoRedo.Do(new Commands.AddDocument(false));
 }
Esempio n. 5
0
 private void topLevelToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UndoRedo.Do(new Commands.AddDocument());
 }
Esempio n. 6
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     UndoRedo.Do(new Commands.DeleteDocument());
 }
Esempio n. 7
0
 private void CreateSubDocument_BTN_Click(object sender, EventArgs e)
 {
     UndoRedo.Do(new Commands.AddDocument(false));
 }