Ejemplo n.º 1
0
 public void SetMemento(ShapeMemento memento)
 {
     shapes.Clear();
     List<ShapeData> shapeData = memento.GetMemento();
     foreach (ShapeData shape in shapeData)
     {
         shapes.Add(ShapeFactory.GetShapeInstance(shape.Type, shape.X, shape.Y, shape.Height, shape.Width, shape.LineWidth, shape.GetColor()));
     }
 }
Ejemplo n.º 2
0
        public void SetMemento(ShapeMemento memento)
        {
            shapes.Clear();
            List <ShapeData> shapeData = memento.GetMemento();

            foreach (ShapeData shape in shapeData)
            {
                shapes.Add(ShapeFactory.GetShapeInstance(shape.Type, shape.X, shape.Y, shape.Height, shape.Width, shape.LineWidth, shape.GetColor()));
            }
        }