Пример #1
0
 private void menuUndo_Click(object sender, EventArgs e)
 {
     if (hUndo != null && hUndo.CanUndo)
     {
         hUndo.Undo();
     }
 }
Пример #2
0
        protected void OnUndo()
        {
            IUndoHandler editable = GetContent <IUndoHandler> ();

            if (editable != null)
            {
                editable.Undo();
            }
        }
Пример #3
0
        private void menuEditUndo_Click(object sender, EventArgs e)
        {
            IUndoHandler h = this.DockPanel.ActiveContent as IUndoHandler;

            if (h != null && h.CanUndo)
            {
                h.Undo();
            }
        }
Пример #4
0
 /// <summary>
 /// Perform an undo in the sourcecode editor.
 /// </summary>
 public void Undo()
 {
     if (undoTracker.CanUndo)
     {
         undoHandler.Undo();
         TxtDocDirty = true;
         undoTracker.UndoAction();
         OnUndoRedo();
     }
 }
Пример #5
0
        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();
                }
            }
        }