private static ICurve GetRandomShape(Random random)
        {
            //we support rectangle, roundedRectangle, circle, ellipse, diamond, Octagon, triangle, star
            int index = random.Next(8);

            switch (index)
            {
            case 0:
                return(CurveFactory.CreateRectangle(25, 15, new Microsoft.Msagl.Core.Geometry.Point()));

            case 1:
                return(CurveFactory.CreateRectangleWithRoundedCorners(35, 25, 3, 3, new Microsoft.Msagl.Core.Geometry.Point()));

            case 2:
                return(CurveFactory.CreateCircle(19, new Microsoft.Msagl.Core.Geometry.Point()));

            case 3:
                return(CurveFactory.CreateEllipse(26, 18, new Microsoft.Msagl.Core.Geometry.Point()));

            case 4:
                return(CurveFactory.CreateDiamond(25, 15, new Microsoft.Msagl.Core.Geometry.Point()));

            case 5:
                return(CurveFactory.CreateOctagon(25, 15, new Microsoft.Msagl.Core.Geometry.Point()));

            case 6:
                return(CurveFactory.CreateInteriorTriangle(30, 20, new Microsoft.Msagl.Core.Geometry.Point()));

            case 7:
                return(CurveFactory.CreateStar(33, new Microsoft.Msagl.Core.Geometry.Point()));
            }

            return(null);
        }