Exemplo n.º 1
0
 public StackBlock(Restorable <T> variable)
     : this()
 {
     SavedValue    = variable.RealValue;
     OldFrame      = variable.LastSaveFrame;
     this.Variable = variable;
 }
Exemplo n.º 2
0
        internal void MaybeSave(Restorable <T> restorable)
        {
            if (restorable.LastSaveFrame != framepointer)
            {
//#if DEBUG
//                Trace.WriteLine(string.Format("Save {0} <- {1}", undoStackPointer, restorable.RealValue));
//#endif
                EnsureSpace();
                undoDataStack[undoStackPointer] = new StackBlock(restorable);
                undoStackPointer        += 1;
                restorable.LastSaveFrame = framepointer;
            }
        }