public void AddUndoUnit(SEUndoUnitAbstract unit)
 {
     if (this._undoTransaction != null)
     {
         this._undoTransaction.AddUndoUnit(unit);
     }
 }
Exemplo n.º 2
0
 public void Clearup()
 {
     if (ComponentChanged == false)
     {
         return;
     }
     SEUndoUnitAbstract[] unitArray = new SEUndoUnitAbstract[this.Count];
     this.CopyTo(unitArray, 0);
     foreach (SEUndoUnitAbstract unit in unitArray)
     {
         SEUndoUnitFormDesigner undoUnitFormDesigner = unit as SEUndoUnitFormDesigner;
         if (undoUnitFormDesigner == null)
         {
             continue;
         }
         if (undoUnitFormDesigner.ComponentChanged)
         {
             if (undoUnitFormDesigner.Type == SEUndoUnitFormDesigner.UndoUnitType.ComponentAdded)
             {
                 IShellControlDev shellControlDev;
                 shellControlDev = undoUnitFormDesigner.Components as IShellControlDev;
                 Debug.Assert(shellControlDev != null, "Component没有实现IShellControlDev");
                 if (shellControlDev != null)
                 {
                     undoUnitFormDesigner.Entity = shellControlDev.Entity;
                 }
             }
         }
         else
         {
             this.Remove(unit);
         }
     }
 }
        public void AddUndoUnit(SEUndoUnitAbstract undoUnit)
        {
            Debug.Assert(undoUnit != null);

            if (this.ActiveHosting != null)
            {
                this.ActiveHosting.AddUndoUnit(undoUnit);
            }
        }
 private void UndoEngineUndoEvent(SEUndoUnitAbstract unit)
 {
     //事务结束后,需要判断此事务中的工作单元是否涉及到组件的添加,删除
     //如果涉及,需要更新属性面板中的组件下拉列表
     if (this.ComponentListChanged)
     {
         UpdatePropertyPadComponentList();
     }
 }
 /// <summary>
 /// 向临时可撤销工作单元添加ISEUndoUnit
 /// </summary>
 /// <param name="undoUnit"></param>
 public void AddUndoUnitList(SEUndoUnitAbstract undoUnit)
 {
     _undoUnitList.Add(undoUnit);
 }
 private void UndoEngineAddUndoUnitEvent(SEUndoUnitAbstract undoUnit)
 {
 }
 public void AddUndoUnit(SEUndoUnitAbstract undoUnit)
 {
     this._undoEngine.AddUndoUnit(undoUnit);
 }
 public void AddUndoUnit(SEUndoUnitAbstract undoUnit)
 {
     FormHostingContainer.Instance.AddUndoUnit(undoUnit);
 }