Ejemplo n.º 1
0
 public static Rectangles Instance(Rectangle R, Canvas C)
 {
     if (_instance == null)
     {
         _instance = new Rectangles(R, C);
     }
     return(_instance);
 }
Ejemplo n.º 2
0
        public Figure(Shape S, string T, Canvas C)
        {
            Fig    = S;
            Type   = T;
            DepPat = C;
            //SetPosition(Canvas.GetLeft(S), Canvas.GetTop(S), Canvas.GetRight(S), Canvas.GetBottom(S));

            if (S.GetType() == typeof(Rectangle))
            {
                DeliFig = Rectangles.Instance((Rectangle)S, DepPat);
            }
            if (S.GetType() == typeof(Ellipse))
            {
                DeliFig = Ellipses.Instance((Ellipse)S, DepPat);
            }

            DeliFig.Draw(S);
        }