public void Reset() { ShapeTypesInfoMap.Clear(); RegisterShapeType(LineCreator.getInstance(), StandardLineRenderer.getInstance()); RegisterShapeType(RectangleCreator.getInstance(), StandardRectangleRenderer.getInstance()); RegisterShapeType(SquareCreator.getInstance(), StandardRectangleRenderer.getInstance()); RegisterShapeType(EllipseCreator.getInstance(), StandardEllipseRenderer.getInstance()); RegisterShapeType(CircleCreator.getInstance(), StandardEllipseRenderer.getInstance()); RegisterShapeType(TriangleCreator.getInstance(), StandardTriangleRenderer.getInstance()); }
static void Main(string[] args) { Creator creator = new CircleCreator(); Shape shape1 = creator.create_shape(); creator = new SquareCreator(); Shape shape2 = creator.create_shape(); creator = new RectangleCreator(); Shape shape3 = creator.create_shape(); }