//======================================================================================== // DoEdited() //======================================================================================== void DoEdited(object sender, EditorEventArgs e) { if (Edited != null) { Edited(sender, e); } }
private void DoEdited(object sender, EditorEventArgs e) { switch (e.Action) { case EditorAction.HasContent: commander.TextControls.IsEnabled = true; break; case EditorAction.HasNoContent: commander.TextControls.IsEnabled = false; break; case EditorAction.Unsaved: commander.SaveControls.IsEnabled = true; SetTitle(); break; } commander.RedoControls.IsEnabled = editorView.CanRedo; commander.UndoControls.IsEnabled = editorView.CanUndo; }