public void AddRange(SEUndoUnitCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
Esempio n. 2
0
 public SEUndoTransaction(SEUndoEngine undoEngine, SEUndoUnitCollection units)
 {
     this.UndoEngine = undoEngine;
     foreach (SEUndoUnitAbstract undoUnit in units)
     {
         AddUndoUnit(undoUnit);
     }
     this.Action = units.Action;
 }
Esempio n. 3
0
 public void AddUndoUnit(SEUndoUnitCollection units)
 {
     if (units == null || units.Count == 0)
     {
         return;
     }
     foreach (SEUndoUnitAbstract undoUnit in units)
     {
         AddUndoUnit(undoUnit);
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 添加一系列工作单元
        /// 这些工作单元将组成一个事务
        /// </summary>
        /// <param name="units"></param>
        public void AddUndoUnit(SEUndoUnitCollection units)
        {
            if (this.Working)
            {
                return;
            }

            if (units == null || units.Count == 0)
            {
                return;
            }

            if (units.Count == 1)
            {
                this.AddUndoUnit(units[0]);
            }
            else
            {
                SEUndoTransaction transaction = new SEUndoTransaction(this, units);
                this.AddUndoUnit(transaction);
            }
        }
 public SEUndoUnitEnumerator(SEUndoUnitCollection mappings)
 {
     this.temp           = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }
 public SEUndoUnitCollection(SEUndoUnitCollection value)
 {
     this.AddRange(value);
 }