private void menuUndo_Click(object sender, EventArgs e) { if (hUndo != null && hUndo.CanUndo) { hUndo.Undo(); } }
protected void OnUndo() { IUndoHandler editable = GetContent <IUndoHandler> (); if (editable != null) { editable.Undo(); } }
private void menuEditUndo_Click(object sender, EventArgs e) { IUndoHandler h = this.DockPanel.ActiveContent as IUndoHandler; if (h != null && h.CanUndo) { h.Undo(); } }
/// <summary> /// Perform an undo in the sourcecode editor. /// </summary> public void Undo() { if (undoTracker.CanUndo) { undoHandler.Undo(); TxtDocDirty = true; undoTracker.UndoAction(); OnUndoRedo(); } }
public override void Run() { IUndoHandler editable = WorkbenchSingleton.Workbench.ActiveContent as IUndoHandler; if (editable != null) { editable.Undo(); } else { TextBoxBase textBox = WorkbenchSingleton.ActiveControl as TextBoxBase; if (textBox != null) { textBox.Undo(); } } }