示例#1
0
        public void SaveShapesTest1()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(5, 5));
            shapeBUS.CreateEllipse();

            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 = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(3, 50));
            shapeBUS.CreatePolyline();

            shapeBUS.AddPoint(new Point(5, 5));
            shapeBUS.CreatePolyline();

            shapeBUS.SaveShapes("test.xaml");

            var fileText = File.ReadLines("test.xaml");

            Assert.IsTrue(fileText.ToString().Length > 1);
        }
示例#2
0
        public void CreatePolylineTest2_With2Points()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(3, 50));

            shapeBUS.CreatePolyline();

            shapeBUS.AddPoint(new Point(5, 5));
            shapeBUS.CreatePolyline();
        }
示例#3
0
        public void NewShapeForCancasTest3()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));
            shapeBUS.AddPoint(new Point(3, 50));

            shapeBUS.CreatePolyline();

            shapeBUS.AddPoint(new Point(5, 5));
            shapeBUS.CreatePolyline();

            CanvasBUS.NewShapeForCancas(shapeBUS.Shapes[0] as PolylineShape);
        }
示例#4
0
        public void CreatePolylineTest_With1Points()
        {
            shapeBUS = new ShapeBUS();
            shapeBUS.AddPoint(new Point(0, 0));

            shapeBUS.CreatePolyline();
        }