Ejemplo n.º 1
0
        public void MoveShapeTest1()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(5, 8));
            shapeBUS.AddPoint(new Point(5, 4));
            shapeBUS.AddPoint(new Point(0, 0));

            shapeBUS.CreatePolygon();
            shapeBUS.ChooseShape("Polygon 1");

            shapeBUS.SetShapeMarginAndStartMovePoint(new Point(0, 1));
            shapeBUS.MoveShape(new Point(2, 3));
        }
Ejemplo n.º 2
0
        public void MoveShapeTest1()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(5, 5));
            shapeBUS.AddPoint(new Point(6, 5));
            shapeBUS.AddPoint(new Point(9, 5));
            shapeBUS.AddPoint(new Point(15, 5));

            shapeBUS.CreatePentagon();

            shapeBUS.ChooseShape("Pentagon_1");

            shapeBUS.SetShapeMarginAndStartMovePoint(new Point(0, 1));
            shapeBUS.MoveShape(new Point(2, 3));
        }
Ejemplo n.º 3
0
 private void CanvasChildren_MouseDown(object sender, MouseButtonEventArgs e)
 {
     bus.SetShapeMarginAndStartMovePoint(Mouse.GetPosition(CanvasPaint));
     CanvasPaint.MouseMove += CanvasContainer_MouseMove;
 }