Beispiel #1
0
 public static Ellipses Instance(Ellipse E, Canvas C)
 {
     if (_instance == null)
     {
         _instance = new Ellipses(E, C);
     }
     return(_instance);
 }
Beispiel #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);
        }