Ejemplo n.º 1
0
 public static void DeleteShapeIfEmpty()
 {
     if (currentDrawingShape.X == currentDrawingShape.EndX &&
         currentDrawingShape.Y == currentDrawingShape.EndY)
     {
         ShapesList.DeleteLastShape();
         ShapeNumber--;
     }
 }
Ejemplo n.º 2
0
 public static void CreateShape(int x, int y, int borderWidth, string borderColor)
 {
     currentDrawingShape             = (Shape)Activator.CreateInstance(CurrentDrawingShapeType);
     currentDrawingShape.X           = x;
     currentDrawingShape.Y           = y;
     currentDrawingShape.BorderWidth = borderWidth;
     currentDrawingShape.BorderColor = borderColor;
     currentDrawingShape.Name        = "Фигура" + Convert.ToString(ShapeNumber++);
     ShapesList.Add(currentDrawingShape);
 }