예제 #1
0
        //close the current job
        public void JobClose()
        {
            //rate control buttons
            if (rc.isRateControlOn)
            {
                btnRate.PerformClick();
            }

            rc.ShutdownRateControl();  //double dam sure its off

            //turn auto button off
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //turn section buttons all OFF and zero square meters
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                section[j].isAllowedOn = false;
                section[j].manBtnState = manBtn.On;
            }

            //turn manual button off
            manualBtnState       = btnStates.Off;
            btnManualOffOn.Image = Properties.Resources.ManualOff;

            //Update the button colors and text
            ManualAllBtnsUpdate();

            //enable disable manual buttons
            LineUpManualBtns();

            btnSection1Man.Enabled = false;
            btnSection2Man.Enabled = false;
            btnSection3Man.Enabled = false;
            btnSection4Man.Enabled = false;
            btnSection5Man.Enabled = false;
            btnSection6Man.Enabled = false;
            btnSection7Man.Enabled = false;
            btnSection8Man.Enabled = false;

            //job is closed
            isJobStarted = false;

            //clear the section lists
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                //clean out the lists
                section[j].patchList?.Clear();
                section[j].triangleList?.Clear();
            }

            //clear out the contour Lists
            ct.ResetContour();

            //clear the flags
            flagPts.Clear();
            btnFlag.Enabled = false;

            //reset the buttons
            btnABLine.Enabled    = false;
            btnABCurve.Enabled   = true;
            btnContour.Enabled   = false;
            btnAutoSteer.Enabled = false;
            isAutoSteerBtnOn     = false;

            ct.isContourBtnOn = false;
            ct.isContourOn    = false;

            //change images to reflect on off
            btnABLine.Image         = Properties.Resources.ABLineOff;
            btnRightYouTurn.Visible = false;
            btnLeftYouTurn.Visible  = false;
            btnContour.Image        = Properties.Resources.ContourOff;
            btnAutoSteer.Image      = Properties.Resources.AutoSteerOff;

            //fix ManualOffOnAuto buttons
            btnManualOffOn.Enabled = false;
            manualBtnState         = btnStates.Off;
            btnManualOffOn.Image   = Properties.Resources.ManualOff;

            //fix auto button
            btnSectionOffAutoOn.Enabled = false;
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //reset all the ABLine stuff
            ABLine.ResetABLine();

            //reset acre and distance counters
            totalSquareMeters = 0;

            //reset boundary
            boundz.ResetBoundary();

            //reset headland
            hl.ResetHeadland();

            //update the menu
            fieldToolStripMenuItem.Text = gStr.gsStartNewField;

            //turn off top level buttons
            btnRightYouTurn.Enabled = false;
            btnLeftYouTurn.Enabled  = false;

            //auto YouTurn shutdown
            yt.isYouTurnBtnOn = false;
            yt.ResetYouTurnAndSequenceEvents();
            youTurnProgressBar = 0;

            //turn off youturn...
            btnEnableAutoYouTurn.Enabled = false;
            yt.isYouTurnBtnOn            = false;
            btnEnableAutoYouTurn.Image   = Properties.Resources.YouTurnNo;

            //reset all Port Module values
            mc.ResetAllModuleCommValues();
        }
예제 #2
0
        //close the current job
        public void JobClose()
        {
            //rate control buttons
            if (rcd.isRateControlOn)
            {
                btnDualRate.PerformClick();
            }

            rcd.ShutdownRateControl();  //double dam sure its off

            btnRateRightDn.Visible = false;
            btnRateRightUp.Visible = false;
            btnRateLeftDn.Visible  = false;
            btnRateLeftUp.Visible  = false;
            btnSelectRate1.Visible = false;
            btnSelectRate2.Visible = false;

            lblFlowRateRight.Visible          = false;
            lblRateAppliedActualRight.Visible = false;
            lblRateSetpointRight.Visible      = false;
            lblFlowRight.Visible = false;

            lblFlowRateLeft.Visible          = false;
            lblRateAppliedActualLeft.Visible = false;
            lblRateSetpointLeft.Visible      = false;
            lblFlowLeft.Visible = false;

            btnDualRate.Image = Properties.Resources.RateControlOff;
            btnDualRate.Text  = "Off";
            lblRateAppliedActualRight.Text = "-";
            lblRateAppliedActualLeft.Text  = "-";
            lblFlowRateLeft.Text           = "-";
            lblFlowRateRight.Text          = "-";

            //turn auto button off
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //turn section buttons all OFF and zero square meters
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                section[j].isAllowedOn = false;
                section[j].manBtnState = manBtn.On;
            }

            //turn manual button off
            manualBtnState       = btnStates.Off;
            btnManualOffOn.Image = Properties.Resources.ManualOff;

            //Update the button colors and text
            ManualAllBtnsUpdate();

            //enable disable manual buttons
            LineUpManualBtns();

            btnSection1Man.Enabled  = false;
            btnSection2Man.Enabled  = false;
            btnSection3Man.Enabled  = false;
            btnSection4Man.Enabled  = false;
            btnSection5Man.Enabled  = false;
            btnSection6Man.Enabled  = false;
            btnSection7Man.Enabled  = false;
            btnSection8Man.Enabled  = false;
            btnSection9Man.Enabled  = false;
            btnSection10Man.Enabled = false;
            btnSection11Man.Enabled = false;
            btnSection12Man.Enabled = false;

            btnSection1Man.BackColor  = Color.Silver;
            btnSection2Man.BackColor  = Color.Silver;
            btnSection3Man.BackColor  = Color.Silver;
            btnSection4Man.BackColor  = Color.Silver;
            btnSection5Man.BackColor  = Color.Silver;
            btnSection6Man.BackColor  = Color.Silver;
            btnSection7Man.BackColor  = Color.Silver;
            btnSection8Man.BackColor  = Color.Silver;
            btnSection9Man.BackColor  = Color.Silver;
            btnSection10Man.BackColor = Color.Silver;
            btnSection11Man.BackColor = Color.Silver;
            btnSection12Man.BackColor = Color.Silver;

            //job is closed
            isJobStarted = false;

            //clear the section lists
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                //clean out the lists
                section[j].patchList?.Clear();
                section[j].triangleList?.Clear();
            }

            //clear out the contour Lists
            ct.ResetContour();

            //clear the flags
            flagPts.Clear();
            btnFlag.Enabled = false;

            //reset the buttons
            btnABLine.Enabled          = false;
            btnContour.Enabled         = false;
            btnContourPriority.Enabled = false;
            btnAutoSteer.Enabled       = false;
            isAutoSteerBtnOn           = false;

            btnCurve.Enabled = false;
            curve.isCurveSet = false;

            ct.isContourBtnOn = false;
            ct.isContourOn    = false;

            //curve line
            btnCurve.Image = Properties.Resources.CurveOff;
            curve.ResetCurveLine();
            curve.isCurveBtnOn = false;
            btnCurve.Enabled   = false;

            //change images to reflect on off
            btnABLine.Image = Properties.Resources.ABLineOff;

            DisableYouTurnButtons();

            btnContour.Image   = Properties.Resources.ContourOff;
            btnAutoSteer.Image = Properties.Resources.AutoSteerOff;

            //fix ManualOffOnAuto buttons
            btnManualOffOn.Enabled = false;
            manualBtnState         = btnStates.Off;
            btnManualOffOn.Image   = Properties.Resources.ManualOff;

            //fix auto button
            btnSectionOffAutoOn.Enabled = false;
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //reset all the ABLine stuff
            ABLine.ResetABLine();

            //reset acre and distance counters
            totalSquareMeters = 0;

            //reset boundaries
            for (int i = 0; i < MAXBOUNDARIES; i++)
            {
                bndArr[i].ResetBoundary();
            }

            //reset headland
            for (int i = 0; i < FormGPS.MAXHEADS; i++)
            {
                hlArr[i].ResetHeadland();
            }

            //update the menu
            fieldToolStripMenuItem.Text = gStr.gsStartNewField;

            //turn off top level buttons
            btnRightYouTurn.Enabled = false;
            btnLeftYouTurn.Enabled  = false;

            //auto YouTurn shutdown
            yt.isYouTurnBtnOn = false;
            yt.ResetYouTurn();
            youTurnProgressBar = 0;

            //turn off youturn...
            btnEnableAutoYouTurn.Enabled = false;
            yt.isYouTurnBtnOn            = false;
            btnEnableAutoYouTurn.Image   = Properties.Resources.YouTurnNo;

            ////turn off path record
            recPath.recList.Clear();
            if (recPath.isRecordOn)
            {
                recPath.isRecordOn          = false;
                btnRecPathPauseRecord.Image = Properties.Resources.BoundaryRecord;
            }

            //reset all Port Module values
            mc.ResetAllModuleCommValues();

            //reset all Dew loop stuff
            yt.dew2Index = 0;
            yt.isDew2Set = false;
            yt.isDew4Set = false;
            yt.dew4Index = 0;
            yt.ResetYouTurn();
        }
예제 #3
0
        //close the current job
        public void JobClose()
        {
            //turn auto button off
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //turn section buttons all OFF and zero square meters
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                section[j].isAllowedOn = false;
                section[j].manBtnState = manBtn.On;
            }

            //turn manual button off
            manualBtnState       = btnStates.Off;
            btnManualOffOn.Image = Properties.Resources.ManualOff;

            //Update the button colors and text
            ManualAllBtnsUpdate();

            //enable disable manual buttons
            LineUpManualBtns();

            btnSection1Man.Enabled = false;
            btnSection2Man.Enabled = false;
            btnSection3Man.Enabled = false;
            btnSection4Man.Enabled = false;
            btnSection5Man.Enabled = false;
            btnSection6Man.Enabled = false;
            btnSection7Man.Enabled = false;
            btnSection8Man.Enabled = false;

            //job is closed
            isJobStarted = false;

            //clear the section lists
            for (int j = 0; j < MAXSECTIONS; j++)
            {
                //clean out the lists
                section[j].patchList.Clear();
                section[j].triangleList?.Clear();
            }

            //clear out the contour Lists
            ct.ResetContour();

            //clear the flags
            flagPts.Clear();
            btnFlag.Enabled = false;

            //reset the buttons
            btnABLine.Enabled    = false;
            btnContour.Enabled   = false;
            btnAutoSteer.Enabled = false;
            btnSnap.Enabled      = false;

            btnAutoYouTurn.Enabled  = false;
            btnRightYouTurn.Enabled = false;
            btnLeftYouTurn.Enabled  = false;

            ct.isContourBtnOn = false;
            ct.isContourOn    = false;

            //change images to reflect on off
            btnABLine.Image         = Properties.Resources.ABLineOff;
            btnRightYouTurn.Visible = false;
            btnLeftYouTurn.Visible  = false;
            btnContour.Image        = Properties.Resources.ContourOff;
            btnAutoSteer.Image      = Properties.Resources.AutoSteerOff;

            //fix ManualOffOnAuto buttons
            btnManualOffOn.Enabled = false;
            manualBtnState         = btnStates.Off;
            btnManualOffOn.Image   = Properties.Resources.ManualOff;

            //fix auto button
            btnSectionOffAutoOn.Enabled = false;
            autoBtnState = btnStates.Off;
            btnSectionOffAutoOn.Image = Properties.Resources.SectionMasterOff;

            //reset all the ABLine stuff
            ABLine.ResetABLine();

            //reset acre and distance counters
            totalSquareMeters = 0;

            //reset boundary
            boundary.ResetBoundary();

            //update the menu
            fieldToolStripMenuItem.Text = "Start Field";

            //rate control buttons
            btnRate1Select.Visible = false;
            btnRate2Select.Visible = false;
            btnRate.Image          = Properties.Resources.RateControlOff;
            rc.ShutdownRateControl();

            //auto YouTurn shutdown
            yt.isAutoYouTurnEnabled = false;
            yt.CancelYouTurn();
            autoTurnInProgressBar = 0;
            btnAutoYouTurn.Text   = "Off";

            //reset all Port Module values
            mc.ResetAllModuleCommValues();
        }