Beispiel #1
0
 public void SaveState(Originator orig)
 {
     _mementos.Push(orig.CreateMemento());
 }
Beispiel #2
0
 public void TakeSnapshot(PictureBox pictureBox)
 {
     Bitmap bit = new Bitmap(pictureBox.Image);
     _orginator = new Originator(bit, pictureBox.Height, pictureBox.Width);
     _history.SaveState(_orginator);
 }
Beispiel #3
0
 public void RestoreState(Originator orig)
 {
     if(_mementos.Count > 1)
         orig.SetMemento(_mementos.Pop());
 }