Пример #1
0
        private void Restart()
        {
            this.FileName = null;

            this.Clear();

            StatusController.canRestart = true;
            polygonLinkAdorner = null;

            if (StatusController.availablePartition == Partition.Left)
            {
                Polygon2D firstPolygon = new Polygon2D(new Point2DCollection());
                LeftPolygon = new Polygon2DAdorner(firstPolygon);
            }
            else
            {
                Polygon2D secondPolygon = new Polygon2D(new Point2DCollection());
                RightPolygon = new Polygon2DAdorner(secondPolygon);
            }
            this.triangulationMenuItem.Enabled = false;
            StatusController.canAddPoint = true;
            this.toolBarButton4.Enabled = true;
            this.toolBarButton4.Pushed = true;
            this.toolBar1.Buttons[5].Enabled = false;

            StatusController.LeftZoom.ratio = 1.0;
            StatusController.LeftZoom.Offset = new PointF(0.0F, -30.0F);
            StatusController.RightZoom.ratio = 1.0;
            StatusController.RightZoom.Offset = new PointF(0.0F, -30.0F);

            this.statusBarPanel1.Text = this.GetPolygonStatus(new Point2D(1,1));
            this.statusBarPanel2.Text = "Hint Index : -1 ";

            this.Invalidate();
        }
Пример #2
0
        private void linkMenuItem_Click_1(object sender, System.EventArgs e)
        {
            Polygon2DLinkMaker polygonLink = new Polygon2DLinkMaker(this.FirstPolygon, 0, 4);
            polygonLink.Divide();
            polygonLink.BuildPath();
            polygonLinkAdorner = new PolygonLinkAdorner(polygonLink);

            this.Invalidate();
        }