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; } }
private void Title_TXT_Leave(object sender, EventArgs e) { UndoRedo.Do(new TextEditor(sender as Control, prevText, (sender as Control).Text)); }
private void currentDirectoryToolStripMenuItem_Click(object sender, EventArgs e) { UndoRedo.Do(new Commands.AddDocument(null)); }
private void subDocumentToolStripMenuItem_Click(object sender, EventArgs e) { UndoRedo.Do(new Commands.AddDocument(false)); }
private void topLevelToolStripMenuItem_Click(object sender, EventArgs e) { UndoRedo.Do(new Commands.AddDocument()); }
private void toolStripButton1_Click(object sender, EventArgs e) { UndoRedo.Do(new Commands.DeleteDocument()); }
private void CreateSubDocument_BTN_Click(object sender, EventArgs e) { UndoRedo.Do(new Commands.AddDocument(false)); }