Esempio n. 1
0
        public override Shape CreateNewShape()
        {
            ShapeConst shape = (ShapeConst)base.CreateNewShape();

            shape.Size = Size;
            return(shape);
        }
Esempio n. 2
0
        public ShapeConst CreateNewShape(Point newLocation)
        {
            ShapeConst shape = (ShapeConst)base.CreateNewShape();

            shape.Size     = Size;
            shape.Location = newLocation;
            return(shape);
        }
Esempio n. 3
0
 public int CompareTo(object obj)
 {
     if (obj is ShapeConst)
     {
         ShapeConst shape = (ShapeConst)obj;
         return(Area - shape.Area);
     }
     return(-1);
 }