Beispiel #1
0
 private void EditMyPMXVertexes(MyPMX mypmx, UnDoRedoRecord record)
 {
     for (int i = 0; i < record._index.Length; i++)
     {
         mypmx.VertexArray[record._index[i]].Position = record._vec[i];
     }
 }
Beispiel #2
0
 /// <summary>
 /// アンドゥをスタックする
 /// </summary>
 /// <param name="pushed"></param>
 public void PushUndo(UnDoRedoRecord pushed)
 {
     undoStack.Push(pushed);
     redoStack = new Stack <UnDoRedoRecord>();
     this._undoToolStripMenuItem.Enabled = true;
     this.redoToolStripMenuItem.Enabled  = false;
 }
Beispiel #3
0
 public void Redo(MyPMX mypmx)
 {
     if (redoStack.Count > 0)
     {
         UnDoRedoRecord poppedout = redoStack.Pop();
         undoStack.Push(new UnDoRedoRecord(poppedout._index, mypmx));
         if (redoStack.Count <= 0)
         {
             this.redoToolStripMenuItem.Enabled = false;
         }
         this._undoToolStripMenuItem.Enabled = true;
         this.EditMyPMXVertexes(mypmx, poppedout);
     }
 }