Exemple #1
0
        private void DrawButton_Click(object sender, RoutedEventArgs e)
        {
            Tool.Clear(e, SelectedShapes, ShapesDao, this);
            RectangleShape s = new RectangleShape();

            s.AllowDrop = true;
            s.Height    = 20;
            s.Width     = 20;
            s.Fill      = Brushes.Black;

            MainComponent m = new MainComponent(s);

            m.AddType(new TextView());

            Board.MainComponent.Childes.Add(m);
            Tool = new Drawer(m, this);
        }
Exemple #2
0
        public MainWindow()
        {
            InitializeComponent();
            canvas.EditingMode     = InkCanvasEditingMode.None;
            canvas.MouseDown      += new MouseButtonEventHandler(this.Canvas_MouseDown);
            canvas.MouseMove      += new MouseEventHandler(this.Canvas_MouseMove);
            canvas.MouseUp        += new MouseButtonEventHandler(this.Canvas_MouseUp);
            canvas.RenderTransform = st;

            SelectButton.Click += SelectButton_Click;
            DrawButton.Click   += DrawButton_Click;
            LightButton.Click  += LightButton_Click;
            Pen.Click          += PenButton_Click;
            Interprete.Click   += InterpreteButton_Click;
            Tool = new Selector(this);


            Board = new Board((int)canvas.Height, (int)canvas.Width);
            MainComponent component2 = new MainComponent(new RectangleShape());

            component2.AddType(new AbsoluteLayout());
            this.Board.MainComponent = component2;
        }