示例#1
0
        public override void StartAlgorithm()
        {
            form.nextButton.Enabled = true;

            form.minAreaButton.Enabled     = false;
            form.maxDiameterButton.Enabled = false;
            form.minimumPermButton.Enabled = false;
            form.addPolygonButton.Enabled  = false;
            form.minWidthButton.Enabled    = false;
            form.continueButton.Enabled    = false;

            //Get the initial angles
            InitialLines();

            TempArea   = Utility.Area(CaliperA, CaliperB, CaliperC, CaliperD);
            AreaStruct = new RectangleStruct(CaliperA, CaliperB, CaliperC, CaliperD, TempArea);

            form.currentAreaTextBox.Text = AreaStruct.MinimumArea.ToString();
            form.minAreaTextBox.Text     = AreaStruct.MinimumArea.ToString();

            Console.WriteLine("MinArea: {0}", AreaStruct.MinimumArea.ToString());
        }
        public override void StartAlgorithm()
        {
            form.nextButton.Enabled = true;

            form.maxDiameterButton.Enabled = false;
            form.minimumPermButton.Enabled = false;
            form.minAreaButton.Enabled     = false;
            form.addPolygonButton.Enabled  = false;
            form.minWidthButton.Enabled    = false;
            form.continueButton.Enabled    = false;

            //Get the initial angles
            InitialLines();

            tempPerim   = Utility.Perimeter(CaliperA, CaliperB, CaliperC, CaliperD);
            perimStruct = new RectangleStruct(CaliperA, CaliperB, CaliperC, CaliperD, tempPerim);

            form.currentPerimTextBox.Text = perimStruct.MinimumPerim.ToString();
            form.minPerimTextBox.Text     = perimStruct.MinimumPerim.ToString();

            Console.WriteLine("MinPerim: {0}", perimStruct.MinimumPerim.ToString());
        }
        public override void StartAlgorithm()
        {
            form.nextButton.Enabled = true;

            form.maxDiameterButton.Enabled = false;
            form.minimumPermButton.Enabled = false;
            form.minAreaButton.Enabled = false;
            form.addPolygonButton.Enabled = false;
            form.minWidthButton.Enabled = false;
            form.continueButton.Enabled = false;

            //Get the initial angles
            InitialLines();

            tempPerim = Utility.Perimeter(CaliperA, CaliperB, CaliperC, CaliperD);
            perimStruct = new RectangleStruct(CaliperA, CaliperB, CaliperC, CaliperD, tempPerim);

            form.currentPerimTextBox.Text = perimStruct.MinimumPerim.ToString();
            form.minPerimTextBox.Text = perimStruct.MinimumPerim.ToString();

            Console.WriteLine("MinPerim: {0}", perimStruct.MinimumPerim.ToString());
        }
        public override void StartAlgorithm()
        {
            form.nextButton.Enabled = true;

            form.minAreaButton.Enabled = false;
            form.maxDiameterButton.Enabled = false;
            form.minimumPermButton.Enabled = false;
            form.addPolygonButton.Enabled = false;
            form.minWidthButton.Enabled = false;
            form.continueButton.Enabled = false;

            //Get the initial angles
            InitialLines();

            TempArea = Utility.Area(CaliperA, CaliperB, CaliperC, CaliperD);
            AreaStruct = new RectangleStruct(CaliperA, CaliperB, CaliperC, CaliperD, TempArea);

            form.currentAreaTextBox.Text = AreaStruct.MinimumArea.ToString();
            form.minAreaTextBox.Text = AreaStruct.MinimumArea.ToString();

            Console.WriteLine("MinArea: {0}", AreaStruct.MinimumArea.ToString());
        }