Пример #1
0
        public static void Main(string[] args)
        {
            var dot1Position = new PlanarPosition(0, 0);
            var dot1Shape    = new Shape("round", CornerType.Rounded);
            var dot1         = new Dot(dot1Shape, dot1Position, 4);

            var dot2 = new Dot()
            {
                Color    = "black",
                Shape    = new Shape("square", CornerType.Square),
                Position = new PlanarPosition(5, 5),
                Size     = 4
            };

            var dot3 = new Dot(null, dot1Position, 8)
            {
                Color = "purple"
            };

            Console.WriteLine(dot1);
            Console.WriteLine(dot2);
            Console.WriteLine(dot3);
            Console.Read();
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of the Dot class
 /// </summary>
 /// <param name="shape">Shape of the Dot</param>
 /// <param name="position">Position of the Dot</param>
 /// <param name="size">Diameter of the Dot, in millimeters</param>
 public Dot(Shape shape, PlanarPosition position, double size)
 {
     Shape    = shape;
     Position = position;
     Size     = size;
 }