Exemplo n.º 1
0
 public void CreateGroup(GroupShapes gr)
 {
     foreach (var shape in gr.Children)
     {
         DrawnShapes.Remove(shape);
         SelectedShapes.Remove(shape);
     }
     DrawnShapes.Add(gr);
     SelectedShapes.Add(gr);
     CreateMemento();
 }
Exemplo n.º 2
0
 public void DeleteGroup(GroupShapes gr)
 {
     if (DrawnShapes.Contains(gr))
     {
         DrawnShapes.Remove(gr);
         foreach (var shape in gr.Children)
         {
             DrawnShapes.Add(shape);
         }
         SelectedShapes.Clear();
         _g.RefreshView();
     }
     CreateMemento();
 }
Exemplo n.º 3
0
 public void EraseShape(IShape shape)
 {
     if (DrawnShapes.Contains(shape))
     {
         DrawnShapes.Remove(shape);
     }
     else
     {
         foreach (var child in ((GroupShapes)shape).Children)
         {
             DrawnShapes.Remove(child);
         }
     }
     _g.RefreshView();
     CreateMemento();
 }