예제 #1
0
        static void Main(string[] args)
        {
            // create a text shape (subclass of Text View in referenced library)
            TextShape textShape = new TextShape(new Point { X = 1, Y = 1 }, new Point { X = 10, Y = 2 });

            // drawing editor (client)
            DrawingEditior editor = new DrawingEditior();
            editor.Shapes= new List<IShape>();
            editor.Shapes.Add(textShape);

            // manipulate them in some way
            editor.ManipulateShapes();
        }
예제 #2
0
        static void Main(string[] args)
        {
            // create a seemingly incompatible TextView object
            TextView textView = new TextView(new Point { X = 1, Y = 1 }, new Point { X = 10, Y = 2 });

            // create a text shape (subclass of shape in this project)
            TextShape textShape = new TextShape(textView);

            // drawing editor (client)
            DrawingEditior editor = new DrawingEditior();
            editor.Shapes= new List<Shape>();
            editor.Shapes.Add(textShape);

            // manipulate them in some way
            editor.ManipulateShapes();
        }
예제 #3
0
        static void Main(string[] args)
        {
            // create a text shape (subclass of Text View in referenced library)
            TextShape textShape = new TextShape(new Point {
                X = 1, Y = 1
            }, new Point {
                X = 10, Y = 2
            });

            // drawing editor (client)
            DrawingEditior editor = new DrawingEditior();

            editor.Shapes = new List <IShape>();
            editor.Shapes.Add(textShape);

            // manipulate them in some way
            editor.ManipulateShapes();
        }
예제 #4
0
        static void Main(string[] args)
        {
            // create a seemingly incompatible TextView object
            TextView textView = new TextView(new Point {
                X = 1, Y = 1
            }, new Point {
                X = 10, Y = 2
            });

            // create a text shape (subclass of shape in this project)
            TextShape textShape = new TextShape(textView);

            // drawing editor (client)
            DrawingEditior editor = new DrawingEditior();

            editor.Shapes = new List <Shape>();
            editor.Shapes.Add(textShape);

            // manipulate them in some way
            editor.ManipulateShapes();
        }