From 4ee2785ff3ff1dd027ae5b83cf7614eed657f84b Mon Sep 17 00:00:00 2001 From: Brian Tischler Date: Tue, 21 Nov 2023 19:07:34 -0700 Subject: [PATCH] head like AB Draw --- SourceCode/GPS/AgOpenGPS.csproj | 19 +- SourceCode/GPS/Classes/CHead.cs | 11 + SourceCode/GPS/Classes/CTrack.cs | 1 - SourceCode/GPS/Forms/FormGPS.Designer.cs | 18 +- SourceCode/GPS/Forms/FormGPS.cs | 2 + SourceCode/GPS/Forms/FormHeadland.Designer.cs | 518 ++++---- SourceCode/GPS/Forms/FormHeadland.cs | 1184 ++++++++++------- SourceCode/GPS/Forms/FormHeadland.resx | 3 + .../GPS/Properties/Resources.Designer.cs | 10 + SourceCode/GPS/Properties/Resources.resx | 181 +-- SourceCode/GPS/btnImages/ABSnapNudgeMenu.png | Bin 0 -> 4182 bytes SourceCode/GPS/btnImages/ArrowLeft.png | Bin 486 -> 568 bytes 12 files changed, 1046 insertions(+), 901 deletions(-) create mode 100644 SourceCode/GPS/btnImages/ABSnapNudgeMenu.png diff --git a/SourceCode/GPS/AgOpenGPS.csproj b/SourceCode/GPS/AgOpenGPS.csproj index 88d6e53df..fefaa00ca 100644 --- a/SourceCode/GPS/AgOpenGPS.csproj +++ b/SourceCode/GPS/AgOpenGPS.csproj @@ -172,6 +172,12 @@ CustomControl1.cs + + Form + + + FormHeadland.cs + Form @@ -244,12 +250,6 @@ FormTouchPick.cs - - Form - - - FormHeadland.cs - Form @@ -569,6 +569,9 @@ FormGPS.cs + + FormHeadland.cs + FormFieldKML.cs @@ -606,9 +609,6 @@ FormTouchPick.cs - - FormHeadland.cs - FormEditCurve.cs @@ -893,6 +893,7 @@ + PreserveNewest diff --git a/SourceCode/GPS/Classes/CHead.cs b/SourceCode/GPS/Classes/CHead.cs index d0611f790..fc93f9d80 100644 --- a/SourceCode/GPS/Classes/CHead.cs +++ b/SourceCode/GPS/Classes/CHead.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace AgOpenGPS { @@ -111,4 +112,14 @@ public bool IsPointInsideHeadArea(vec2 pt) return false; } } + + public class CHdTracks + { + public List trackPts = new List(); + public double aveHeading = 3; + public string name = "aa"; + public double moveDistance = 0; + public int mode = 0; + } + } \ No newline at end of file diff --git a/SourceCode/GPS/Classes/CTrack.cs b/SourceCode/GPS/Classes/CTrack.cs index 6fa0b1120..9bc6cf6fa 100644 --- a/SourceCode/GPS/Classes/CTrack.cs +++ b/SourceCode/GPS/Classes/CTrack.cs @@ -1132,7 +1132,6 @@ public class CTrackPath public vec3 ptA = new vec3(); public vec3 ptB = new vec3(); public int mode = 0; - public bool isLinedUp = false; } } diff --git a/SourceCode/GPS/Forms/FormGPS.Designer.cs b/SourceCode/GPS/Forms/FormGPS.Designer.cs index 4b63fddb7..8afc0d358 100644 --- a/SourceCode/GPS/Forms/FormGPS.Designer.cs +++ b/SourceCode/GPS/Forms/FormGPS.Designer.cs @@ -672,7 +672,7 @@ private void InitializeComponent() this.btnResetSteerAngle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnResetSteerAngle.Font = new System.Drawing.Font("Tahoma", 9.75F); this.btnResetSteerAngle.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnResetSteerAngle.Location = new System.Drawing.Point(157, 4); + this.btnResetSteerAngle.Location = new System.Drawing.Point(156, 4); this.btnResetSteerAngle.Name = "btnResetSteerAngle"; this.btnResetSteerAngle.Size = new System.Drawing.Size(43, 31); this.btnResetSteerAngle.TabIndex = 162; @@ -697,10 +697,10 @@ private void InitializeComponent() this.hsbarSteerAngle.Dock = System.Windows.Forms.DockStyle.Fill; this.hsbarSteerAngle.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.hsbarSteerAngle.LargeChange = 20; - this.hsbarSteerAngle.Location = new System.Drawing.Point(204, 1); + this.hsbarSteerAngle.Location = new System.Drawing.Point(203, 1); this.hsbarSteerAngle.Maximum = 800; this.hsbarSteerAngle.Name = "hsbarSteerAngle"; - this.hsbarSteerAngle.Size = new System.Drawing.Size(94, 37); + this.hsbarSteerAngle.Size = new System.Drawing.Size(93, 37); this.hsbarSteerAngle.TabIndex = 179; this.hsbarSteerAngle.Value = 400; this.hsbarSteerAngle.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hsbarSteerAngle_Scroll); @@ -713,7 +713,7 @@ private void InitializeComponent() this.hsbarStepDistance.Location = new System.Drawing.Point(59, 1); this.hsbarStepDistance.Minimum = -25; this.hsbarStepDistance.Name = "hsbarStepDistance"; - this.hsbarStepDistance.Size = new System.Drawing.Size(94, 37); + this.hsbarStepDistance.Size = new System.Drawing.Size(93, 37); this.hsbarStepDistance.TabIndex = 178; this.hsbarStepDistance.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hsbarStepDistance_Scroll); // @@ -1178,7 +1178,7 @@ private void InitializeComponent() this.btnAdjLines.FlatAppearance.BorderSize = 0; this.btnAdjLines.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAdjLines.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnAdjLines.Image = global::AgOpenGPS.Properties.Resources.ArrowLeft; + this.btnAdjLines.Image = global::AgOpenGPS.Properties.Resources.ABSnapNudgeMenu; this.btnAdjLines.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.btnAdjLines.Location = new System.Drawing.Point(3, 129); this.btnAdjLines.Name = "btnAdjLines"; @@ -1450,7 +1450,7 @@ private void InitializeComponent() this.panelSim.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.panelSim.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 54F)); this.panelSim.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 59F)); - this.panelSim.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 97F)); + this.panelSim.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 99F)); this.panelSim.Controls.Add(this.btnSimForward, 6, 0); this.panelSim.Controls.Add(this.btnSimSetSpeedToZero, 5, 0); this.panelSim.Controls.Add(this.btnSimReverse, 4, 0); @@ -1474,7 +1474,7 @@ private void InitializeComponent() this.btnSimForward.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSimForward.Font = new System.Drawing.Font("Tahoma", 9.75F); this.btnSimForward.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnSimForward.Location = new System.Drawing.Point(417, 4); + this.btnSimForward.Location = new System.Drawing.Point(415, 4); this.btnSimForward.Name = "btnSimForward"; this.btnSimForward.Size = new System.Drawing.Size(41, 31); this.btnSimForward.TabIndex = 454; @@ -1493,7 +1493,7 @@ private void InitializeComponent() this.btnSimSetSpeedToZero.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSimSetSpeedToZero.Font = new System.Drawing.Font("Tahoma", 9.75F); this.btnSimSetSpeedToZero.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnSimSetSpeedToZero.Location = new System.Drawing.Point(357, 4); + this.btnSimSetSpeedToZero.Location = new System.Drawing.Point(355, 4); this.btnSimSetSpeedToZero.Name = "btnSimSetSpeedToZero"; this.btnSimSetSpeedToZero.Size = new System.Drawing.Size(53, 31); this.btnSimSetSpeedToZero.TabIndex = 453; @@ -1509,7 +1509,7 @@ private void InitializeComponent() this.btnSimReverse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSimReverse.Font = new System.Drawing.Font("Tahoma", 9.75F); this.btnSimReverse.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnSimReverse.Location = new System.Drawing.Point(302, 4); + this.btnSimReverse.Location = new System.Drawing.Point(300, 4); this.btnSimReverse.Name = "btnSimReverse"; this.btnSimReverse.Size = new System.Drawing.Size(47, 31); this.btnSimReverse.TabIndex = 455; diff --git a/SourceCode/GPS/Forms/FormGPS.cs b/SourceCode/GPS/Forms/FormGPS.cs index 711f9ff5b..9ab1776ae 100644 --- a/SourceCode/GPS/Forms/FormGPS.cs +++ b/SourceCode/GPS/Forms/FormGPS.cs @@ -981,6 +981,8 @@ public void JobClose() trk.isBtnTrackOn = false; trk.isAutoTrack = false; + btnAutoTrack.BackColor = Color.Transparent; + trk.ResetTrack(); trk.tracksArr?.Clear(); trk.idx = -1; diff --git a/SourceCode/GPS/Forms/FormHeadland.Designer.cs b/SourceCode/GPS/Forms/FormHeadland.Designer.cs index 5a29c1585..9128eb6c4 100644 --- a/SourceCode/GPS/Forms/FormHeadland.Designer.cs +++ b/SourceCode/GPS/Forms/FormHeadland.Designer.cs @@ -31,29 +31,27 @@ private void InitializeComponent() this.components = new System.ComponentModel.Container(); this.oglSelf = new OpenTK.GLControl(); this.timer1 = new System.Windows.Forms.Timer(this.components); - this.nudDistance = new System.Windows.Forms.NumericUpDown(); - this.btnDeletePoints = new System.Windows.Forms.Button(); - this.btnMakeFixedHeadland = new System.Windows.Forms.Button(); - this.btnExit = new System.Windows.Forms.Button(); - this.nudSetDistance = new System.Windows.Forms.NumericUpDown(); - this.btnSetDistance = new System.Windows.Forms.Button(); - this.btnReset = new System.Windows.Forms.Button(); - this.btnTurnOffHeadland = new System.Windows.Forms.Button(); - this.cboxToolWidths = new System.Windows.Forms.ComboBox(); + this.lblNumCu = new System.Windows.Forms.Label(); + this.lblCurveSelected = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.lblHeadlandWidth = new System.Windows.Forms.Label(); - this.lblWidthUnits = new System.Windows.Forms.Label(); - this.cboxIsSectionControlled = new System.Windows.Forms.CheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.nudDistance)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudSetDistance)).BeginInit(); + this.tboxNameCurve = new System.Windows.Forms.TextBox(); + this.headingGroupBox = new System.Windows.Forms.GroupBox(); + this.rbtnLine = new System.Windows.Forms.RadioButton(); + this.rbtnCurve = new System.Windows.Forms.RadioButton(); + this.btnALength = new System.Windows.Forms.Button(); + this.btnBLength = new System.Windows.Forms.Button(); + this.btnCancelTouch = new System.Windows.Forms.Button(); + this.btnDeleteCurve = new System.Windows.Forms.Button(); + this.btnSelectCurve = new System.Windows.Forms.Button(); + this.btnExit = new System.Windows.Forms.Button(); + this.headingGroupBox.SuspendLayout(); this.SuspendLayout(); // // oglSelf // this.oglSelf.BackColor = System.Drawing.Color.Black; this.oglSelf.Cursor = System.Windows.Forms.Cursors.Cross; - this.oglSelf.Location = new System.Drawing.Point(5, 7); + this.oglSelf.Location = new System.Drawing.Point(5, 3); this.oglSelf.Margin = new System.Windows.Forms.Padding(0); this.oglSelf.Name = "oglSelf"; this.oglSelf.Size = new System.Drawing.Size(700, 700); @@ -70,61 +68,198 @@ private void InitializeComponent() this.timer1.Interval = 500; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // - // nudDistance - // - this.nudDistance.BackColor = System.Drawing.Color.AliceBlue; - this.nudDistance.DecimalPlaces = 1; - this.nudDistance.Font = new System.Drawing.Font("Tahoma", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nudDistance.Location = new System.Drawing.Point(751, 180); - this.nudDistance.Maximum = new decimal(new int[] { - 2000, - 0, - 0, - 0}); - this.nudDistance.Name = "nudDistance"; - this.nudDistance.ReadOnly = true; - this.nudDistance.Size = new System.Drawing.Size(148, 52); - this.nudDistance.TabIndex = 338; - this.nudDistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.nudDistance.Click += new System.EventHandler(this.nudDistance_Click); - this.nudDistance.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.nudDistance_HelpRequested); - // - // btnDeletePoints - // - this.btnDeletePoints.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnDeletePoints.BackColor = System.Drawing.Color.Transparent; - this.btnDeletePoints.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnDeletePoints.FlatAppearance.BorderColor = System.Drawing.Color.Silver; - this.btnDeletePoints.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnDeletePoints.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnDeletePoints.Image = global::AgOpenGPS.Properties.Resources.HeadlandDeletePoints; - this.btnDeletePoints.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnDeletePoints.Location = new System.Drawing.Point(734, 421); - this.btnDeletePoints.Name = "btnDeletePoints"; - this.btnDeletePoints.Size = new System.Drawing.Size(73, 61); - this.btnDeletePoints.TabIndex = 452; - this.btnDeletePoints.UseVisualStyleBackColor = false; - this.btnDeletePoints.Click += new System.EventHandler(this.btnDeletePoints_Click); - this.btnDeletePoints.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnDeletePoints_HelpRequested); - // - // btnMakeFixedHeadland - // - this.btnMakeFixedHeadland.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnMakeFixedHeadland.BackColor = System.Drawing.Color.Transparent; - this.btnMakeFixedHeadland.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnMakeFixedHeadland.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; - this.btnMakeFixedHeadland.FlatAppearance.BorderSize = 0; - this.btnMakeFixedHeadland.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnMakeFixedHeadland.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnMakeFixedHeadland.Image = global::AgOpenGPS.Properties.Resources.OK64; - this.btnMakeFixedHeadland.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnMakeFixedHeadland.Location = new System.Drawing.Point(925, 176); - this.btnMakeFixedHeadland.Name = "btnMakeFixedHeadland"; - this.btnMakeFixedHeadland.Size = new System.Drawing.Size(73, 61); - this.btnMakeFixedHeadland.TabIndex = 450; - this.btnMakeFixedHeadland.UseVisualStyleBackColor = false; - this.btnMakeFixedHeadland.Click += new System.EventHandler(this.btnMakeFixedHeadland_Click); - this.btnMakeFixedHeadland.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnMakeFixedHeadland_HelpRequested); + // lblNumCu + // + this.lblNumCu.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblNumCu.ForeColor = System.Drawing.Color.Black; + this.lblNumCu.Location = new System.Drawing.Point(954, 576); + this.lblNumCu.Margin = new System.Windows.Forms.Padding(0); + this.lblNumCu.Name = "lblNumCu"; + this.lblNumCu.Size = new System.Drawing.Size(35, 26); + this.lblNumCu.TabIndex = 327; + this.lblNumCu.Text = "1"; + this.lblNumCu.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblCurveSelected + // + this.lblCurveSelected.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCurveSelected.ForeColor = System.Drawing.Color.Black; + this.lblCurveSelected.Location = new System.Drawing.Point(875, 577); + this.lblCurveSelected.Margin = new System.Windows.Forms.Padding(0); + this.lblCurveSelected.Name = "lblCurveSelected"; + this.lblCurveSelected.Size = new System.Drawing.Size(35, 26); + this.lblCurveSelected.TabIndex = 329; + this.lblCurveSelected.Text = "1"; + this.lblCurveSelected.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.Black; + this.label1.Location = new System.Drawing.Point(917, 578); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(29, 23); + this.label1.TabIndex = 332; + this.label1.Text = "of"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tboxNameCurve + // + this.tboxNameCurve.BackColor = System.Drawing.SystemColors.ControlLight; + this.tboxNameCurve.CausesValidation = false; + this.tboxNameCurve.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tboxNameCurve.Location = new System.Drawing.Point(715, 549); + this.tboxNameCurve.Margin = new System.Windows.Forms.Padding(0); + this.tboxNameCurve.MaxLength = 100; + this.tboxNameCurve.Name = "tboxNameCurve"; + this.tboxNameCurve.Size = new System.Drawing.Size(283, 27); + this.tboxNameCurve.TabIndex = 10; + this.tboxNameCurve.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.tboxNameCurve.Enter += new System.EventHandler(this.tboxNameCurve_Enter); + this.tboxNameCurve.Leave += new System.EventHandler(this.tboxNameCurve_Leave); + // + // headingGroupBox + // + this.headingGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.headingGroupBox.Controls.Add(this.rbtnLine); + this.headingGroupBox.Controls.Add(this.rbtnCurve); + this.headingGroupBox.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.headingGroupBox.ForeColor = System.Drawing.Color.Black; + this.headingGroupBox.Location = new System.Drawing.Point(873, 131); + this.headingGroupBox.Name = "headingGroupBox"; + this.headingGroupBox.Size = new System.Drawing.Size(115, 227); + this.headingGroupBox.TabIndex = 438; + this.headingGroupBox.TabStop = false; + this.headingGroupBox.Text = "Track"; + // + // rbtnLine + // + this.rbtnLine.Appearance = System.Windows.Forms.Appearance.Button; + this.rbtnLine.BackColor = System.Drawing.Color.AliceBlue; + this.rbtnLine.FlatAppearance.CheckedBackColor = System.Drawing.Color.PaleTurquoise; + this.rbtnLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.rbtnLine.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rbtnLine.ForeColor = System.Drawing.Color.Black; + this.rbtnLine.Image = global::AgOpenGPS.Properties.Resources.ABTrackAB; + this.rbtnLine.Location = new System.Drawing.Point(15, 133); + this.rbtnLine.Name = "rbtnLine"; + this.rbtnLine.Size = new System.Drawing.Size(80, 80); + this.rbtnLine.TabIndex = 2; + this.rbtnLine.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.rbtnLine.UseVisualStyleBackColor = false; + // + // rbtnCurve + // + this.rbtnCurve.Appearance = System.Windows.Forms.Appearance.Button; + this.rbtnCurve.BackColor = System.Drawing.Color.AliceBlue; + this.rbtnCurve.Checked = true; + this.rbtnCurve.FlatAppearance.CheckedBackColor = System.Drawing.Color.PaleTurquoise; + this.rbtnCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.rbtnCurve.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rbtnCurve.ForeColor = System.Drawing.Color.Black; + this.rbtnCurve.Image = global::AgOpenGPS.Properties.Resources.ABTrackCurve; + this.rbtnCurve.Location = new System.Drawing.Point(15, 32); + this.rbtnCurve.Name = "rbtnCurve"; + this.rbtnCurve.Size = new System.Drawing.Size(80, 80); + this.rbtnCurve.TabIndex = 0; + this.rbtnCurve.TabStop = true; + this.rbtnCurve.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.rbtnCurve.UseVisualStyleBackColor = false; + // + // btnALength + // + this.btnALength.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnALength.BackColor = System.Drawing.Color.Linen; + this.btnALength.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btnALength.FlatAppearance.BorderColor = System.Drawing.Color.DarkOrange; + this.btnALength.FlatAppearance.BorderSize = 2; + this.btnALength.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnALength.Font = new System.Drawing.Font("Tahoma", 14.25F); + this.btnALength.Image = global::AgOpenGPS.Properties.Resources.DrawLineExtendA; + this.btnALength.ImageAlign = System.Drawing.ContentAlignment.TopCenter; + this.btnALength.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.btnALength.Location = new System.Drawing.Point(736, 253); + this.btnALength.Name = "btnALength"; + this.btnALength.Size = new System.Drawing.Size(70, 91); + this.btnALength.TabIndex = 352; + this.btnALength.UseVisualStyleBackColor = false; + this.btnALength.Click += new System.EventHandler(this.btnALength_Click); + // + // btnBLength + // + this.btnBLength.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnBLength.BackColor = System.Drawing.Color.Azure; + this.btnBLength.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btnBLength.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; + this.btnBLength.FlatAppearance.BorderSize = 2; + this.btnBLength.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnBLength.Font = new System.Drawing.Font("Tahoma", 14.25F); + this.btnBLength.Image = global::AgOpenGPS.Properties.Resources.DrawLineExtendB; + this.btnBLength.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; + this.btnBLength.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.btnBLength.Location = new System.Drawing.Point(736, 156); + this.btnBLength.Name = "btnBLength"; + this.btnBLength.Size = new System.Drawing.Size(70, 91); + this.btnBLength.TabIndex = 351; + this.btnBLength.UseVisualStyleBackColor = false; + this.btnBLength.Click += new System.EventHandler(this.btnBLength_Click); + // + // btnCancelTouch + // + this.btnCancelTouch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancelTouch.BackColor = System.Drawing.Color.Transparent; + this.btnCancelTouch.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnCancelTouch.Enabled = false; + this.btnCancelTouch.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; + this.btnCancelTouch.FlatAppearance.BorderSize = 0; + this.btnCancelTouch.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelTouch.Font = new System.Drawing.Font("Tahoma", 14.25F); + this.btnCancelTouch.Image = global::AgOpenGPS.Properties.Resources.HeadlandDeletePoints; + this.btnCancelTouch.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.btnCancelTouch.Location = new System.Drawing.Point(924, 470); + this.btnCancelTouch.Name = "btnCancelTouch"; + this.btnCancelTouch.Size = new System.Drawing.Size(64, 63); + this.btnCancelTouch.TabIndex = 1; + this.btnCancelTouch.UseVisualStyleBackColor = false; + this.btnCancelTouch.Click += new System.EventHandler(this.btnCancelTouch_Click); + // + // btnDeleteCurve + // + this.btnDeleteCurve.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnDeleteCurve.BackColor = System.Drawing.Color.Transparent; + this.btnDeleteCurve.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btnDeleteCurve.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; + this.btnDeleteCurve.FlatAppearance.BorderSize = 0; + this.btnDeleteCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnDeleteCurve.Font = new System.Drawing.Font("Tahoma", 14.25F); + this.btnDeleteCurve.Image = global::AgOpenGPS.Properties.Resources.Trash; + this.btnDeleteCurve.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.btnDeleteCurve.Location = new System.Drawing.Point(715, 628); + this.btnDeleteCurve.Name = "btnDeleteCurve"; + this.btnDeleteCurve.Size = new System.Drawing.Size(70, 68); + this.btnDeleteCurve.TabIndex = 6; + this.btnDeleteCurve.UseVisualStyleBackColor = false; + this.btnDeleteCurve.Click += new System.EventHandler(this.btnDeleteCurve_Click); + // + // btnSelectCurve + // + this.btnSelectCurve.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSelectCurve.BackColor = System.Drawing.Color.Transparent; + this.btnSelectCurve.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.btnSelectCurve.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; + this.btnSelectCurve.FlatAppearance.BorderSize = 0; + this.btnSelectCurve.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSelectCurve.Font = new System.Drawing.Font("Tahoma", 14.25F); + this.btnSelectCurve.Image = global::AgOpenGPS.Properties.Resources.ABLineCycle; + this.btnSelectCurve.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.btnSelectCurve.Location = new System.Drawing.Point(838, 470); + this.btnSelectCurve.Name = "btnSelectCurve"; + this.btnSelectCurve.Size = new System.Drawing.Size(70, 68); + this.btnSelectCurve.TabIndex = 5; + this.btnSelectCurve.UseVisualStyleBackColor = false; + this.btnSelectCurve.Click += new System.EventHandler(this.btnSelectCurve_Click); // // btnExit // @@ -136,218 +271,33 @@ private void InitializeComponent() this.btnExit.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnExit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnExit.Image = global::AgOpenGPS.Properties.Resources.OK64; - this.btnExit.Location = new System.Drawing.Point(875, 637); + this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnExit.Location = new System.Drawing.Point(873, 626); this.btnExit.Name = "btnExit"; this.btnExit.Size = new System.Drawing.Size(123, 70); - this.btnExit.TabIndex = 234; + this.btnExit.TabIndex = 0; this.btnExit.UseVisualStyleBackColor = false; this.btnExit.Click += new System.EventHandler(this.btnExit_Click); - this.btnExit.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnExit_HelpRequested); - // - // nudSetDistance - // - this.nudSetDistance.BackColor = System.Drawing.Color.AliceBlue; - this.nudSetDistance.DecimalPlaces = 1; - this.nudSetDistance.Font = new System.Drawing.Font("Tahoma", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nudSetDistance.Location = new System.Drawing.Point(751, 300); - this.nudSetDistance.Maximum = new decimal(new int[] { - 2000, - 0, - 0, - 0}); - this.nudSetDistance.Minimum = new decimal(new int[] { - 2000, - 0, - 0, - -2147483648}); - this.nudSetDistance.Name = "nudSetDistance"; - this.nudSetDistance.ReadOnly = true; - this.nudSetDistance.Size = new System.Drawing.Size(148, 52); - this.nudSetDistance.TabIndex = 457; - this.nudSetDistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.nudSetDistance.Click += new System.EventHandler(this.nudSetDistance_Click); - this.nudSetDistance.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.nudSetDistance_HelpRequested); - // - // btnSetDistance - // - this.btnSetDistance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSetDistance.BackColor = System.Drawing.Color.Transparent; - this.btnSetDistance.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnSetDistance.FlatAppearance.BorderColor = System.Drawing.Color.Silver; - this.btnSetDistance.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnSetDistance.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnSetDistance.Image = global::AgOpenGPS.Properties.Resources.HeadlandTouchSave; - this.btnSetDistance.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnSetDistance.Location = new System.Drawing.Point(925, 296); - this.btnSetDistance.Name = "btnSetDistance"; - this.btnSetDistance.Size = new System.Drawing.Size(73, 61); - this.btnSetDistance.TabIndex = 458; - this.btnSetDistance.UseVisualStyleBackColor = false; - this.btnSetDistance.Click += new System.EventHandler(this.btnSetDistance_Click); - this.btnSetDistance.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnSetDistance_HelpRequested); - // - // btnReset - // - this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnReset.BackColor = System.Drawing.Color.Transparent; - this.btnReset.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnReset.FlatAppearance.BorderColor = System.Drawing.Color.Silver; - this.btnReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnReset.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnReset.ForeColor = System.Drawing.Color.Black; - this.btnReset.Image = global::AgOpenGPS.Properties.Resources.back_button; - this.btnReset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnReset.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnReset.Location = new System.Drawing.Point(734, 523); - this.btnReset.Name = "btnReset"; - this.btnReset.Size = new System.Drawing.Size(204, 75); - this.btnReset.TabIndex = 459; - this.btnReset.Text = "Reset"; - this.btnReset.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnReset.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.btnReset.UseVisualStyleBackColor = false; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); - this.btnReset.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnReset_HelpRequested); - // - // btnTurnOffHeadland - // - this.btnTurnOffHeadland.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnTurnOffHeadland.BackColor = System.Drawing.Color.Transparent; - this.btnTurnOffHeadland.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.btnTurnOffHeadland.FlatAppearance.BorderColor = System.Drawing.SystemColors.HotTrack; - this.btnTurnOffHeadland.FlatAppearance.BorderSize = 0; - this.btnTurnOffHeadland.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnTurnOffHeadland.Font = new System.Drawing.Font("Tahoma", 14.25F); - this.btnTurnOffHeadland.Image = global::AgOpenGPS.Properties.Resources.SwitchOff; - this.btnTurnOffHeadland.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.btnTurnOffHeadland.Location = new System.Drawing.Point(726, 637); - this.btnTurnOffHeadland.Name = "btnTurnOffHeadland"; - this.btnTurnOffHeadland.Size = new System.Drawing.Size(88, 70); - this.btnTurnOffHeadland.TabIndex = 460; - this.btnTurnOffHeadland.UseVisualStyleBackColor = false; - this.btnTurnOffHeadland.Click += new System.EventHandler(this.btnTurnOffHeadland_Click); - this.btnTurnOffHeadland.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.btnTurnOffHeadland_HelpRequested); - // - // cboxToolWidths - // - this.cboxToolWidths.Anchor = System.Windows.Forms.AnchorStyles.None; - this.cboxToolWidths.BackColor = System.Drawing.Color.Lavender; - this.cboxToolWidths.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboxToolWidths.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cboxToolWidths.Font = new System.Drawing.Font("Tahoma", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cboxToolWidths.FormattingEnabled = true; - this.cboxToolWidths.Items.AddRange(new object[] { - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12", - "13", - "14"}); - this.cboxToolWidths.Location = new System.Drawing.Point(751, 46); - this.cboxToolWidths.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.cboxToolWidths.Name = "cboxToolWidths"; - this.cboxToolWidths.Size = new System.Drawing.Size(88, 53); - this.cboxToolWidths.TabIndex = 461; - this.cboxToolWidths.SelectedIndexChanged += new System.EventHandler(this.cboxToolWidths_SelectedIndexChanged); - this.cboxToolWidths.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.cboxToolWidths_HelpRequested); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.BackColor = System.Drawing.Color.Transparent; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.Black; - this.label1.Location = new System.Drawing.Point(708, 52); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(40, 42); - this.label1.TabIndex = 462; - this.label1.Text = "#"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.BackColor = System.Drawing.Color.Transparent; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.ForeColor = System.Drawing.Color.Black; - this.label2.Location = new System.Drawing.Point(708, 186); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(41, 42); - this.label2.TabIndex = 463; - this.label2.Text = "+"; - // - // lblHeadlandWidth - // - this.lblHeadlandWidth.AutoSize = true; - this.lblHeadlandWidth.BackColor = System.Drawing.Color.Transparent; - this.lblHeadlandWidth.Font = new System.Drawing.Font("Tahoma", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblHeadlandWidth.ForeColor = System.Drawing.Color.Black; - this.lblHeadlandWidth.Location = new System.Drawing.Point(856, 46); - this.lblHeadlandWidth.Name = "lblHeadlandWidth"; - this.lblHeadlandWidth.Size = new System.Drawing.Size(87, 39); - this.lblHeadlandWidth.TabIndex = 464; - this.lblHeadlandWidth.Text = "23.8"; - // - // lblWidthUnits - // - this.lblWidthUnits.AutoSize = true; - this.lblWidthUnits.BackColor = System.Drawing.Color.Transparent; - this.lblWidthUnits.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblWidthUnits.ForeColor = System.Drawing.Color.Black; - this.lblWidthUnits.Location = new System.Drawing.Point(885, 84); - this.lblWidthUnits.Name = "lblWidthUnits"; - this.lblWidthUnits.Size = new System.Drawing.Size(27, 24); - this.lblWidthUnits.TabIndex = 465; - this.lblWidthUnits.Text = "m"; - // - // cboxIsSectionControlled - // - this.cboxIsSectionControlled.Appearance = System.Windows.Forms.Appearance.Button; - this.cboxIsSectionControlled.BackColor = System.Drawing.Color.Transparent; - this.cboxIsSectionControlled.FlatAppearance.BorderColor = System.Drawing.Color.Silver; - this.cboxIsSectionControlled.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal; - this.cboxIsSectionControlled.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cboxIsSectionControlled.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cboxIsSectionControlled.ForeColor = System.Drawing.SystemColors.ButtonFace; - this.cboxIsSectionControlled.Image = global::AgOpenGPS.Properties.Resources.SectionMasterOff; - this.cboxIsSectionControlled.Location = new System.Drawing.Point(875, 412); - this.cboxIsSectionControlled.Name = "cboxIsSectionControlled"; - this.cboxIsSectionControlled.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.cboxIsSectionControlled.Size = new System.Drawing.Size(86, 81); - this.cboxIsSectionControlled.TabIndex = 466; - this.cboxIsSectionControlled.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.cboxIsSectionControlled.UseVisualStyleBackColor = false; - this.cboxIsSectionControlled.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.cboxIsSectionControlled_HelpRequested); // // FormHeadland // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Gainsboro; + this.BackColor = System.Drawing.Color.WhiteSmoke; this.ClientSize = new System.Drawing.Size(1004, 709); - this.Controls.Add(this.cboxIsSectionControlled); - this.Controls.Add(this.lblWidthUnits); - this.Controls.Add(this.lblHeadlandWidth); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.cboxToolWidths); - this.Controls.Add(this.btnTurnOffHeadland); - this.Controls.Add(this.btnReset); - this.Controls.Add(this.btnSetDistance); - this.Controls.Add(this.nudSetDistance); - this.Controls.Add(this.btnDeletePoints); - this.Controls.Add(this.btnMakeFixedHeadland); - this.Controls.Add(this.nudDistance); + this.Controls.Add(this.headingGroupBox); + this.Controls.Add(this.btnALength); + this.Controls.Add(this.btnBLength); + this.Controls.Add(this.tboxNameCurve); + this.Controls.Add(this.btnCancelTouch); + this.Controls.Add(this.lblCurveSelected); + this.Controls.Add(this.lblNumCu); + this.Controls.Add(this.btnDeleteCurve); + this.Controls.Add(this.btnSelectCurve); this.Controls.Add(this.btnExit); this.Controls.Add(this.oglSelf); + this.Controls.Add(this.label1); + this.ForeColor = System.Drawing.Color.Black; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.HelpButton = true; this.MaximizeBox = false; @@ -358,8 +308,7 @@ private void InitializeComponent() this.Text = "Click 2 points on the Boundary to Begin"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormHeadland_FormClosing); this.Load += new System.EventHandler(this.FormHeadland_Load); - ((System.ComponentModel.ISupportInitialize)(this.nudDistance)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudSetDistance)).EndInit(); + this.headingGroupBox.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -370,18 +319,17 @@ private void InitializeComponent() private OpenTK.GLControl oglSelf; private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Button btnExit; - private System.Windows.Forms.NumericUpDown nudDistance; - private System.Windows.Forms.Button btnMakeFixedHeadland; - private System.Windows.Forms.Button btnDeletePoints; - private System.Windows.Forms.NumericUpDown nudSetDistance; - private System.Windows.Forms.Button btnSetDistance; - private System.Windows.Forms.Button btnReset; - private System.Windows.Forms.Button btnTurnOffHeadland; - private System.Windows.Forms.ComboBox cboxToolWidths; + private System.Windows.Forms.Button btnSelectCurve; + private System.Windows.Forms.Button btnDeleteCurve; + private System.Windows.Forms.Label lblNumCu; + private System.Windows.Forms.Label lblCurveSelected; + private System.Windows.Forms.Button btnCancelTouch; private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label lblHeadlandWidth; - private System.Windows.Forms.Label lblWidthUnits; - private System.Windows.Forms.CheckBox cboxIsSectionControlled; + private System.Windows.Forms.TextBox tboxNameCurve; + private System.Windows.Forms.Button btnBLength; + private System.Windows.Forms.Button btnALength; + private System.Windows.Forms.GroupBox headingGroupBox; + private System.Windows.Forms.RadioButton rbtnLine; + private System.Windows.Forms.RadioButton rbtnCurve; } } \ No newline at end of file diff --git a/SourceCode/GPS/Forms/FormHeadland.cs b/SourceCode/GPS/Forms/FormHeadland.cs index 631a35a0a..dfa9e0ba0 100644 --- a/SourceCode/GPS/Forms/FormHeadland.cs +++ b/SourceCode/GPS/Forms/FormHeadland.cs @@ -1,8 +1,10 @@ using OpenTK; using OpenTK.Graphics.OpenGL; using System; -using System.Collections.Generic; using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; using System.Windows.Forms; namespace AgOpenGPS @@ -14,381 +16,372 @@ public partial class FormHeadland : Form private Point fixPt; - private bool isA, isSet, isClosing; - public double headWidth = 0; - private int A, B, C, D, E, start = 99999, end = 99999; - private double totalHeadlandWidth = 0; + private bool isA = true; + private int start = 99999, end = 99999; + private int bndSelect = 0; public vec3 pint = new vec3(0.0, 1.0, 0.0); - //list of coordinates of boundary line - public List headLineTemplate = new List(); - - private vec3[] hdx2; - private vec3[] hdArr; - public FormHeadland(Form callingForm) { //get copy of the calling main form mf = callingForm as FormGPS; InitializeComponent(); - //lblPick.Text = gStr.gsSelectALine; - this.Text = gStr.gsHeadlandForm; - btnReset.Text = gStr.gsResetAll; - - nudDistance.Controls[0].Enabled = false; mf.CalculateMinMax(); } private void FormHeadland_Load(object sender, EventArgs e) { - isA = true; - isSet = false; + FixLabelsCurve(); + } - cboxIsSectionControlled.Checked = mf.bnd.isSectionControlledByHeadland; + private void FormHeadland_FormClosing(object sender, FormClosingEventArgs e) + { + //trk + if (mf.trk.idx == -1) + { + if (mf.isAutoSteerBtnOn) mf.btnAutoSteer.PerformClick(); + if (mf.yt.isYouTurnBtnOn) mf.btnAutoYouTurn.PerformClick(); + mf.trk.isBtnTrackOn = false; + mf.btnGuidance.Image = Properties.Resources.TrackOff; + } + + mf.FileSaveTracks(); + + if (mf.trk.isBtnTrackOn) + { + if (mf.trk.idx < 0) + { + } + } + } - lblHeadlandWidth.Text = "0"; - lblWidthUnits.Text = mf.unitsFtM; + private void btnVisible_Click(object sender, EventArgs e) + { + mf.trk.tracksArr[mf.trk.idx].isVisible = !mf.trk.tracksArr[mf.trk.idx].isVisible; + + mf.FileSaveTracks(); + } - //Builds line - nudDistance.Value = 0; - nudSetDistance.Value = 0; + private void FixLabelsCurve() + { + lblNumCu.Text = mf.trk.tracksArr.Count.ToString(); + lblCurveSelected.Text = (mf.trk.idx+1).ToString(); - if (mf.bnd.bndList[0].hdLine.Count > 0) + if (mf.trk.idx > -1) { - hdArr = new vec3[mf.bnd.bndList[0].hdLine.Count]; - mf.bnd.bndList[0].hdLine.CopyTo(hdArr); - RebuildHeadLineTemplate(); + tboxNameCurve.Text = mf.trk.tracksArr[mf.trk.idx].name; + tboxNameCurve.Enabled = true; } else { - BuildHeadLineTemplateFromBoundary(); + tboxNameCurve.Text = "***"; + tboxNameCurve.Enabled = false; } - mf.CloseTopMosts(); } - private void FormHeadland_FormClosing(object sender, FormClosingEventArgs e) + private void btnSelectCurve_Click(object sender, EventArgs e) { - if (!isClosing) + if (mf.trk.tracksArr.Count > 0) { - e.Cancel = true; - return; + mf.trk.idx++; + if (mf.trk.idx > (mf.trk.tracksArr.Count-1)) mf.trk.idx = 0; + } + else + { + mf.trk.idx = -1; } + + FixLabelsCurve(); } - public void BuildHeadLineTemplateFromBoundary() + private void btnCancelTouch_Click(object sender, EventArgs e) { - //to fill the list of line points - vec3 point = new vec3(); + isA = true; + start = 99999; end = 99999; - totalHeadlandWidth = 0; - lblHeadlandWidth.Text = "0"; - nudDistance.Value = 0; - //nudSetDistance.Value = 0; + btnCancelTouch.Enabled = false; + btnExit.Focus(); + } - //outside boundary - count the points from the boundary - headLineTemplate.Clear(); + private void nudDistance_Click(object sender, EventArgs e) + { + mf.KeypadToNUD((NumericUpDown)sender, this); + btnSelectCurve.Focus(); + } - int ptCount = mf.bnd.bndList[0].fenceLine.Count; - for (int i = ptCount - 1; i >= 0; i--) + private void btnDeleteCurve_Click(object sender, EventArgs e) + { + if (mf.trk.tracksArr.Count > 0 && mf.trk.idx > -1) { - //calculate the point inside the boundary - point.easting = mf.bnd.bndList[0].fenceLine[i].easting; - point.northing = mf.bnd.bndList[0].fenceLine[i].northing; - point.heading = mf.bnd.bndList[0].fenceLine[i].heading; - headLineTemplate.Add(point); + mf.trk.tracksArr.RemoveAt(mf.trk.idx); + mf.trk.idx--; } - start = end = 99999; - isSet = false; - - int cnt = headLineTemplate.Count; + if (mf.trk.tracksArr.Count > 0) + { + if (mf.trk.idx == -1) + { + mf.trk.idx++; + } + } + else mf.trk.idx = -1; - hdArr = new vec3[cnt]; - headLineTemplate.CopyTo(hdArr); + FixLabelsCurve(); + } - hdx2 = new vec3[cnt * 2]; + private void tboxNameCurve_Leave(object sender, EventArgs e) + { + if (mf.trk.idx > -1) + mf.trk.tracksArr[mf.trk.idx].name = tboxNameCurve.Text.Trim(); + } - for (int i = 0; i < cnt; i++) + private void tboxNameCurve_Enter(object sender, EventArgs e) + { + if (mf.trk.tracksArr[mf.trk.idx].mode == (int)(TrackMode.bndTrackOuter)) { - hdx2[i] = hdArr[i]; + btnExit.Focus(); + return; } - for (int i = cnt; i < cnt * 2; i++) + if (mf.isKeyboardOn) { - hdx2[i] = hdArr[i - cnt]; + mf.KeyboardToText((System.Windows.Forms.TextBox)sender, this); + if (mf.trk.idx > -1) + mf.trk.tracksArr[mf.trk.idx].name = tboxNameCurve.Text.Trim(); + btnExit.Focus(); } } - private void RebuildHeadLineTemplate() + private void btnMakeOuterBoundaryCurve_Click(object sender, EventArgs e) { - headLineTemplate.Clear(); - + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; - //Builds line - nudDistance.Value = 0; - //nudSetDistance.Value = 0; - - int cnt = hdArr.Length; - for (int i = 0; i < cnt; i++) + //make the boundary list directly + for (int i = 0; i < mf.bnd.bndList[0].fenceLine.Count; i++) { - vec3 pt = new vec3(hdArr[i]); - headLineTemplate.Add(pt); + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(new vec3(mf.bnd.bndList[0].fenceLine[i])); } + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0])); - cnt = headLineTemplate.Count; + mf.trk.CalculateTurnHeadings(); - hdArr = new vec3[cnt]; - headLineTemplate.CopyTo(hdArr); + mf.trk.tracksArr[mf.trk.idx].aveHeading = 0; - hdx2 = new vec3[cnt * 2]; + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "Outer Boundary Curve"; + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.bndTrackOuter; - for (int i = 0; i < cnt; i++) - { - hdx2[i] = hdArr[i]; - } + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; - for (int i = cnt; i < cnt * 2; i++) - { - hdx2[i] = hdArr[i - cnt]; - } + mf.trk.tracksArr[mf.trk.idx].ptA = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0]); + mf.trk.tracksArr[mf.trk.idx].ptB = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[mf.trk.tracksArr[mf.trk.idx].trackPts.Count - 1]); + + mf.FileSaveTracks(); + start = 99999; end = 99999; - start = end = 99999; - isSet = false; + FixLabelsCurve(); + btnExit.Focus(); } - private void FixTurnLine(double totalHeadWidth, List curBnd, double spacing) + private void btnMakeInnerBoundaryCurve_Click(object sender, EventArgs e) { - //count the points from the boundary - - List foos = new List(hdArr); - - int lineCount = foos.Count; - double distance; - - //int headCount = mf.bndArr[inTurnNum].bndLine.Count; - int bndCount = curBnd.Count; - //remove the points too close to boundary - for (int i = 0; i < bndCount; i++) + for (int q = 1; q < mf.bnd.bndList.Count; q++) { - for (int j = 0; j < lineCount; j++) + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; + + //make the boundary list directly + for (int i = 0; i < mf.bnd.bndList[q].fenceLine.Count; i++) { - //make sure distance between headland and boundary is not less then width - distance = glm.Distance(curBnd[i], foos[j]); - if (distance < (totalHeadWidth * 0.96)) - { - if (j > -1 && j < foos.Count) - { - foos.RemoveAt(j); - lineCount = foos.Count; - } - j = -1; - } + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(new vec3(mf.bnd.bndList[q].fenceLine[i])); } - } + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0])); - //make sure distance isn't too small between points on turnLine - bndCount = foos.Count; + mf.trk.CalculateTurnHeadings(); - //double spacing = mf.tool.toolWidth * 0.25; - for (int i = 0; i < bndCount - 1; i++) - { - distance = glm.Distance(foos[i], foos[i + 1]); - if (distance < spacing) - { - if (i > -1 && (i + 1) < foos.Count) - { - foos.RemoveAt(i + 1); - bndCount = foos.Count; - } - i--; - } + mf.trk.tracksArr[mf.trk.idx].aveHeading = 0; + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.bndTrackInner; + + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "Inner Boundary Curve " + q.ToString(); + + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; + + mf.trk.tracksArr[mf.trk.idx].ptA = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0]); + mf.trk.tracksArr[mf.trk.idx].ptB = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[mf.trk.tracksArr[mf.trk.idx].trackPts.Count - 1]); } - bndCount = foos.Count; - - hdArr = new vec3[bndCount]; - foos.CopyTo(hdArr); - - ////make sure distance isn't too big between points on Turn - //bndCount = foos.Count; - //for (int i = 0; i < bndCount; i++) - //{ - // int j = i + 1; - // if (j == bndCount) j = 0; - // distance = glm.DistanceSquared(foos[i].easting, foos[i].northing, foos[j].easting, foos[j].northing); - // if (distance > 2.3) - // { - // vec3 pointB = new vec3((foos[i].easting + foos[j].easting) / 2.0, - // (foos[i].northing + foos[j].northing) / 2.0, - // foos[j].heading); - - // foos.Insert(j, pointB); - // bndCount = foos.Count; - // i--; - // } - //} + mf.FileSaveTracks(); + start = 99999; end = 99999; + + FixLabelsCurve(); + btnExit.Focus(); } - private void btnSetDistance_Click(object sender, EventArgs e) + private void BtnMakeCurve_Click(object sender, EventArgs e) { - double width = (double)nudSetDistance.Value * mf.ftOrMtoM; + btnCancelTouch.Enabled = false; + + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; + + bool isLoop = false; + int limit = end; - if (end > headLineTemplate.Count) + vec3 ptA = new vec3(mf.bnd.bndList[bndSelect].fenceLine[start]); + vec3 ptB = new vec3(mf.bnd.bndList[bndSelect].fenceLine[end]); + + if ((Math.Abs(start - end)) > (mf.bnd.bndList[bndSelect].fenceLine.Count * 0.5)) { - for (int i = start; i < hdArr.Length; i++) + isLoop = true; + if (start < end) + { + limit = end; + end = 0; + } + else { - hdArr[i].easting = headLineTemplate[i].easting - + (-Math.Sin(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].northing = headLineTemplate[i].northing - + (-Math.Cos(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].heading = headLineTemplate[i].heading; + limit = end; + end = mf.bnd.bndList[bndSelect].fenceLine.Count; } + } + + mf.trk.tracksArr[mf.trk.idx].trackPts?.Clear(); + vec3 pt3 = new vec3(); - end -= hdArr.Length; - for (int i = 0; i < end; i++) + if (start < end) + { + for (int i = start; i <= end; i++) { - hdArr[i].easting = headLineTemplate[i].easting - + (-Math.Sin(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].northing = headLineTemplate[i].northing - + (-Math.Cos(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].heading = headLineTemplate[i].heading; + //calculate the point inside the boundary + pt3 = mf.bnd.bndList[bndSelect].fenceLine[i]; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt3); + + if (isLoop && i == mf.bnd.bndList[bndSelect].fenceLine.Count - 1) + { + i = -1; + isLoop = false; + end = limit; + } } } else { - for (int i = start; i < end; i++) + for (int i = start; i >= end; i--) { //calculate the point inside the boundary - hdArr[i].easting = headLineTemplate[i].easting - + (-Math.Sin(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].northing = headLineTemplate[i].northing - + (-Math.Cos(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].heading = headLineTemplate[i].heading; + pt3 = mf.bnd.bndList[bndSelect].fenceLine[i]; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt3); + + if (isLoop && i == 0) + { + i = mf.bnd.bndList[bndSelect].fenceLine.Count - 1; + isLoop = false; + end = limit; + } } } - isSet = false; - start = 99999; - end = 99999; - RebuildHeadLineTemplate(); - } - private void btnMakeFixedHeadland_Click(object sender, EventArgs e) - { - double width = (double)nudDistance.Value * mf.ftOrMtoM; - for (int i = 0; i < headLineTemplate.Count; i++) + //who knows which way it actually goes + mf.trk.CalculateTurnHeadings(); + + //calculate average heading of line + double x = 0, y = 0; + + foreach (vec3 pt in mf.trk.tracksArr[mf.trk.idx].trackPts) { - //calculate the point inside the boundary - hdArr[i].easting = headLineTemplate[i].easting + (-Math.Sin(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].northing = headLineTemplate[i].northing + (-Math.Cos(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].heading = headLineTemplate[i].heading; + x += Math.Cos(pt.heading); + y += Math.Sin(pt.heading); } + x /= mf.trk.tracksArr[mf.trk.idx].trackPts.Count; + y /= mf.trk.tracksArr[mf.trk.idx].trackPts.Count; + mf.trk.tracksArr[mf.trk.idx].aveHeading = Math.Atan2(y, x); + if (mf.trk.tracksArr[mf.trk.idx].aveHeading < 0) mf.trk.tracksArr[mf.trk.idx].aveHeading += glm.twoPI; - totalHeadlandWidth += width; - lblHeadlandWidth.Text = (totalHeadlandWidth * mf.m2FtOrM).ToString("N2"); + //build the tail extensions + mf.trk.AddFirstLastPoints(ref mf.trk.tracksArr[mf.trk.idx].trackPts); + mf.trk.SmoothTrack(4); + mf.trk.CalculateTurnHeadings(); - FixTurnLine(width, headLineTemplate, 2); + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "Cu " + (Math.Round(glm.toDegrees(mf.trk.tracksArr[mf.trk.idx].aveHeading), 1)).ToString(CultureInfo.InvariantCulture) + + "\u00B0" + mf.FindDirection(mf.trk.tracksArr[mf.trk.idx].aveHeading) + DateTime.Now.ToString("mm:ss", CultureInfo.InvariantCulture); - isSet = false; - start = 99999; - end = 99999; - RebuildHeadLineTemplate(); - } + mf.trk.tracksArr[mf.trk.idx].ptA = ptA; + mf.trk.tracksArr[mf.trk.idx].ptB = ptB; - private void cboxToolWidths_SelectedIndexChanged(object sender, EventArgs e) - { - BuildHeadLineTemplateFromBoundary(); - double width = (Math.Round(mf.tool.width * cboxToolWidths.SelectedIndex, 1)); + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; - for (int i = 0; i < headLineTemplate.Count; i++) - { - //calculate the point inside the boundary - hdArr[i].easting = headLineTemplate[i].easting + (-Math.Sin(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].northing = headLineTemplate[i].northing + (-Math.Cos(glm.PIBy2 + headLineTemplate[i].heading) * width); - hdArr[i].heading = headLineTemplate[i].heading; - } + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.Curve; - lblHeadlandWidth.Text = (width * mf.m2FtOrM).ToString("N2"); - totalHeadlandWidth = width; + mf.FileSaveTracks(); - FixTurnLine(width, headLineTemplate, 2); + start = 99999; end = 99999; - isSet = false; - start = 99999; - end = 99999; - RebuildHeadLineTemplate(); + FixLabelsCurve(); + btnExit.Focus(); } - private void oglSelf_Paint(object sender, PaintEventArgs e) + private void BtnMakeABLine_Click(object sender, EventArgs e) { - oglSelf.MakeCurrent(); - - GL.Clear(ClearBufferMask.DepthBufferBit | ClearBufferMask.ColorBufferBit); - GL.LoadIdentity(); // Reset The View + btnCancelTouch.Enabled = false; - //back the camera up - GL.Translate(0, 0, -mf.maxFieldDistance); + vec3 ptA = new vec3(mf.bnd.bndList[bndSelect].fenceLine[start]); + vec3 ptB = new vec3(mf.bnd.bndList[bndSelect].fenceLine[end]); - //translate to that spot in the world - GL.Translate(-mf.fieldCenterX, -mf.fieldCenterY, 0); + //calculate the AB Heading + double abHead = Math.Atan2( + mf.bnd.bndList[bndSelect].fenceLine[end].easting - mf.bnd.bndList[bndSelect].fenceLine[start].easting, + mf.bnd.bndList[bndSelect].fenceLine[end].northing - mf.bnd.bndList[bndSelect].fenceLine[start].northing); + if (abHead < 0) abHead += glm.twoPI; - GL.Color3(1, 1, 1); + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; - //if (start == 99999) - // lblStart.Text = "--"; - //else lblStart.Text = start.ToString(); + mf.trk.tracksArr[mf.trk.idx].aveHeading = abHead; - //if (end == 99999) - // lblEnd.Text = "--"; - //else lblEnd.Text = end.ToString(); + mf.trk.tracksArr[mf.trk.idx].trackPts?.Clear(); - //draw all the boundaries - mf.bnd.DrawFenceLines(); - - int ptCount = hdArr.Length; - if (ptCount > 1) + for (int i = 0; i <= (int)(glm.Distance(ptA, ptB) / 2); i++) { - GL.LineWidth(1); - GL.Color3(0.20f, 0.96232f, 0.30f); - GL.PointSize(2); - GL.Begin(PrimitiveType.LineStrip); - for (int h = 0; h < ptCount; h++) GL.Vertex3(hdArr[h].easting, hdArr[h].northing, 0); - - GL.Color3(0.60f, 0.9232f, 0.0f); - GL.Vertex3(hdArr[0].easting, hdArr[0].northing, 0); - GL.End(); + vec3 ptC = new vec3(ptA); + ptC.easting = (Math.Sin(abHead) * 2 * i) + ptA.easting; + ptC.northing = (Math.Cos(abHead) * 2 * i) + ptA.northing; + ptC.heading = abHead; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(ptC); } - GL.PointSize(8.0f); - GL.Begin(PrimitiveType.Points); - GL.Color3(0.95f, 0.90f, 0.0f); - GL.Vertex3(mf.pivotAxlePos.easting, mf.pivotAxlePos.northing, 0.0); - GL.End(); + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "AB " + (Math.Round(glm.toDegrees(mf.trk.tracksArr[mf.trk.idx].aveHeading), 1)).ToString(CultureInfo.InvariantCulture) + + "\u00B0" + mf.FindDirection(mf.trk.tracksArr[mf.trk.idx].aveHeading) + DateTime.Now.ToString("hh:mm:ss", CultureInfo.InvariantCulture); - DrawABTouchLine(); + mf.trk.tracksArr[mf.trk.idx].ptA = ptA; + mf.trk.tracksArr[mf.trk.idx].ptB = ptB; - GL.Flush(); - oglSelf.SwapBuffers(); + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; + + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.AB; + + mf.FileSaveTracks(); + + FixLabelsCurve(); + start = 99999; end = 99999; } private void oglSelf_MouseDown(object sender, MouseEventArgs e) { - if (isSet) - { - isSet = false; - start = 99999; - end = 99999; - return; - } + btnCancelTouch.Enabled = true; - Point pt = oglSelf.PointToClient(Cursor.Position); + Point ptt = oglSelf.PointToClient(Cursor.Position); //Convert to Origin in the center of window, 800 pixels - fixPt.X = pt.X - 350; - fixPt.Y = (700 - pt.Y - 350); + fixPt.X = ptt.X - 350; + fixPt.Y = (700 - ptt.Y - 350); vec3 plotPt = new vec3 { //convert screen coordinates to field coordinates @@ -405,353 +398,528 @@ private void oglSelf_MouseDown(object sender, MouseEventArgs e) if (isA) { - double minDistA = 1000000, minDistB = 1000000; + double minDistA = double.MaxValue; start = 99999; end = 99999; - int ptCount = hdx2.Length; - - if (ptCount > 0) + for (int j = 0; j < mf.bnd.bndList.Count; j++) { - //find the closest 2 points to current fix - for (int t = 0; t < ptCount; t++) + for (int i = 0; i < mf.bnd.bndList[j].fenceLine.Count; i++) { - double dist = ((pint.easting - hdx2[t].easting) * (pint.easting - hdx2[t].easting)) - + ((pint.northing - hdx2[t].northing) * (pint.northing - hdx2[t].northing)); + double dist = ((pint.easting - mf.bnd.bndList[j].fenceLine[i].easting) * (pint.easting - mf.bnd.bndList[j].fenceLine[i].easting)) + + ((pint.northing - mf.bnd.bndList[j].fenceLine[i].northing) * (pint.northing - mf.bnd.bndList[j].fenceLine[i].northing)); if (dist < minDistA) { - minDistB = minDistA; - B = A; minDistA = dist; - A = t; - } - else if (dist < minDistB) - { - minDistB = dist; - B = t; + bndSelect = j; + start = i; } } - - //just need to make sure the points continue ascending or heading switches all over the place - if (A > B) { E = A; A = B; B = E; } - - start = A; } isA = false; } else { - double minDistA = 1000000, minDistB = 1000000; + double minDistA = double.MaxValue; + int j = bndSelect; + + for (int i = 0; i < mf.bnd.bndList[j].fenceLine.Count; i++) + { + double dist = ((pint.easting - mf.bnd.bndList[j].fenceLine[i].easting) * (pint.easting - mf.bnd.bndList[j].fenceLine[i].easting)) + + ((pint.northing - mf.bnd.bndList[j].fenceLine[i].northing) * (pint.northing - mf.bnd.bndList[j].fenceLine[i].northing)); + if (dist < minDistA) + { + minDistA = dist; + end = i; + } + } - int ptCount = hdx2.Length; + isA = true; - if (ptCount > 0) + //build the lines + if (rbtnCurve.Checked) { - //find the closest 2 points to current point - for (int t = 0; t < ptCount; t++) + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; + + bool isLoop = false; + int limit = end; + + vec3 ptA = new vec3(); + vec3 ptB = new vec3(); + + if ((Math.Abs(start - end)) > (mf.bnd.bndList[bndSelect].fenceLine.Count * 0.5)) { - double dist = ((pint.easting - hdx2[t].easting) * (pint.easting - hdx2[t].easting)) - + ((pint.northing - hdx2[t].northing) * (pint.northing - hdx2[t].northing)); - if (dist < minDistA) + if (start > end) { - minDistB = minDistA; - D = C; - minDistA = dist; - C = t; + (start, end) = (end, start); } - else if (dist < minDistB) + + ptA = new vec3(mf.bnd.bndList[bndSelect].fenceLine[start]); + ptB = new vec3(mf.bnd.bndList[bndSelect].fenceLine[end]); + + isLoop = true; + if (start < end) { - minDistB = dist; - D = t; + limit = end; + end = 0; + } + else + { + limit = end; + end = mf.bnd.bndList[bndSelect].fenceLine.Count; } } - //just need to make sure the points continue ascending or heading switches all over the place - if (C > D) { E = C; C = D; D = E; } - } + else + { + if (start < end) + { + (start, end) = (end, start); + } - isA = true; + ptA = new vec3(mf.bnd.bndList[bndSelect].fenceLine[start]); + ptB = new vec3(mf.bnd.bndList[bndSelect].fenceLine[end]); + } - int A1 = Math.Abs(A - C); - int B1 = Math.Abs(A - D); - int C1 = Math.Abs(B - C); - int D1 = Math.Abs(B - D); + mf.trk.tracksArr[mf.trk.idx].trackPts?.Clear(); + vec3 pt3 = new vec3(); - if (A1 <= B1 && A1 <= C1 && A1 <= D1) { start = A; end = C; } - else if (B1 <= A1 && B1 <= C1 && B1 <= D1) { start = A; end = D; } - else if (C1 <= B1 && C1 <= A1 && C1 <= D1) { start = B; end = C; } - else if (D1 <= B1 && D1 <= C1 && D1 <= A1) { start = B; end = D; } + if (start < end) + { + for (int i = start; i <= end; i++) + { + //calculate the point inside the boundary + pt3 = mf.bnd.bndList[bndSelect].fenceLine[i]; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt3); + + if (isLoop && i == mf.bnd.bndList[bndSelect].fenceLine.Count - 1) + { + i = -1; + isLoop = false; + end = limit; + } + } + } + else + { + for (int i = start; i >= end; i--) + { + //calculate the point inside the boundary + pt3 = mf.bnd.bndList[bndSelect].fenceLine[i]; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt3); + + if (isLoop && i == 0) + { + i = mf.bnd.bndList[bndSelect].fenceLine.Count - 1; + isLoop = false; + end = limit; + } + } + } - if (start > end) { E = start; start = end; end = E; } + //who knows which way it actually goes + mf.trk.CalculateTurnHeadings(); - isSet = true; - } - } + //calculate average heading of line + double x = 0, y = 0; - private void DrawABTouchLine() - { - GL.PointSize(6); - GL.Begin(PrimitiveType.Points); + foreach (vec3 pt in mf.trk.tracksArr[mf.trk.idx].trackPts) + { + x += Math.Cos(pt.heading); + y += Math.Sin(pt.heading); + } + x /= mf.trk.tracksArr[mf.trk.idx].trackPts.Count; + y /= mf.trk.tracksArr[mf.trk.idx].trackPts.Count; + mf.trk.tracksArr[mf.trk.idx].aveHeading = Math.Atan2(y, x); + if (mf.trk.tracksArr[mf.trk.idx].aveHeading < 0) mf.trk.tracksArr[mf.trk.idx].aveHeading += glm.twoPI; - GL.Color3(0.990, 0.00, 0.250); - if (start != 99999) GL.Vertex3(hdx2[start].easting, hdx2[start].northing, 0); + //build the tail extensions + //mf.trk.AddFirstLastPoints(ref mf.trk.tracksArr[mf.trk.idx].trackPts); + mf.trk.SmoothTrack(4); + mf.trk.CalculateTurnHeadings(); - GL.Color3(0.990, 0.960, 0.250); - if (end != 99999) GL.Vertex3(hdx2[end].easting, hdx2[end].northing, 0); - GL.End(); + int ptCnt = mf.trk.tracksArr[mf.trk.idx].trackPts.Count - 1; - if (start != 99999 && end != 99999) - { - GL.Color3(0.965, 0.250, 0.950); - //draw the turn line oject - GL.LineWidth(2.0f); - GL.Begin(PrimitiveType.LineStrip); - int ptCount = hdx2.Length; - if (ptCount < 1) return; - for (int c = start; c < end; c++) GL.Vertex3(hdx2[c].easting, hdx2[c].northing, 0); + for (int i = 1; i < 30; i += 2) + { + vec3 pt = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[ptCnt]); + pt.easting += (Math.Sin(pt.heading) * i); + pt.northing += (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt); + } - GL.End(); - } - } + vec3 stat = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0]); - private void btnReset_Click(object sender, EventArgs e) - { - BuildHeadLineTemplateFromBoundary(); + for (int i = 1; i < 30; i += 2) + { + vec3 pt = new vec3(stat); + pt.easting -= (Math.Sin(pt.heading) * i); + pt.northing -= (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Insert(0, pt); + } - } - private void nudDistance_Click(object sender, EventArgs e) - { - mf.KeypadToNUD((NumericUpDown)sender, this); - btnExit.Focus(); - } + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "Cu " + (Math.Round(glm.toDegrees(mf.trk.tracksArr[mf.trk.idx].aveHeading), 1)).ToString(CultureInfo.InvariantCulture) + + "\u00B0" + mf.FindDirection(mf.trk.tracksArr[mf.trk.idx].aveHeading) + DateTime.Now.ToString("mm:ss", CultureInfo.InvariantCulture); - private void nudSetDistance_Click(object sender, EventArgs e) - { - mf.KeypadToNUD((NumericUpDown)sender, this); - btnExit.Focus(); - } + mf.trk.tracksArr[mf.trk.idx].ptA = ptA; + mf.trk.tracksArr[mf.trk.idx].ptB = ptB; - private void timer1_Tick(object sender, EventArgs e) - { - oglSelf.Refresh(); - if (isSet) - { - btnExit.Enabled = false; - btnMakeFixedHeadland.Enabled = false; - nudDistance.Enabled = false; - - nudSetDistance.Enabled = true; - btnSetDistance.Enabled = true; - //btnMoveLeft.Enabled = true; - //btnMoveRight.Enabled = true; - //btnMoveUp.Enabled = true; - //btnMoveDown.Enabled = true; - //btnDoneManualMove.Enabled = true; - btnDeletePoints.Enabled = true; - //btnStartUp.Enabled = true; - //btnStartDown.Enabled = true; - //btnEndDown.Enabled = true; - //btnEndUp.Enabled = true; - } - else - { - nudSetDistance.Enabled = false; - btnSetDistance.Enabled = false; - //btnMoveLeft.Enabled = false; - //btnMoveRight.Enabled = false; - //btnMoveUp.Enabled = false; - //btnMoveDown.Enabled = false; - //btnDoneManualMove.Enabled = false; - btnDeletePoints.Enabled = false; - //btnStartUp.Enabled = false; - //btnStartDown.Enabled = false; - //btnEndDown.Enabled = false; - //btnEndUp.Enabled = false; - - btnExit.Enabled = true; - btnMakeFixedHeadland.Enabled = true; - nudDistance.Enabled = true; - } - } + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; - private void btnExit_Click(object sender, EventArgs e) - { - mf.bnd.bndList[0].hdLine?.Clear(); + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.Curve; - //does headland control sections - mf.bnd.isSectionControlledByHeadland = cboxIsSectionControlled.Checked; - Properties.Settings.Default.setHeadland_isSectionControlled = cboxIsSectionControlled.Checked; - Properties.Settings.Default.Save(); + mf.FileSaveTracks(); - //middle points - for (int i = 1; i < hdArr.Length; i++) - { - hdArr[i - 1].heading = Math.Atan2(hdArr[i - 1].easting - hdArr[i].easting, hdArr[i - 1].northing - hdArr[i].northing); - if (hdArr[i].heading < 0) hdArr[i].heading += glm.twoPI; - if (hdArr[i].heading > glm.twoPI) hdArr[i].heading -= glm.twoPI; - } + //update the arrays + start = 99999; end = 99999; - double delta = 0; - for (int i = 0; i < hdArr.Length; i++) - { - if (i == 0) - { - mf.bnd.bndList[0].hdLine.Add(new vec3(hdArr[i].easting, hdArr[i].northing, hdArr[i].heading)); - continue; + FixLabelsCurve(); + btnExit.Focus(); } - delta += (hdArr[i - 1].heading - hdArr[i].heading); - if (Math.Abs(delta) > 0.01) + else if (rbtnLine.Checked) { - vec3 pt = new vec3(hdArr[i].easting, hdArr[i].northing, hdArr[i].heading); + vec3 ptA = new vec3(mf.bnd.bndList[bndSelect].fenceLine[start]); + vec3 ptB = new vec3(mf.bnd.bndList[bndSelect].fenceLine[end]); + + //calculate the AB Heading + double abHead = Math.Atan2( + mf.bnd.bndList[bndSelect].fenceLine[end].easting - mf.bnd.bndList[bndSelect].fenceLine[start].easting, + mf.bnd.bndList[bndSelect].fenceLine[end].northing - mf.bnd.bndList[bndSelect].fenceLine[start].northing); + if (abHead < 0) abHead += glm.twoPI; + + mf.trk.tracksArr.Add(new CTrackPath()); + mf.trk.idx = mf.trk.tracksArr.Count - 1; + + mf.trk.tracksArr[mf.trk.idx].aveHeading = abHead; + + mf.trk.tracksArr[mf.trk.idx].trackPts?.Clear(); + + ptA.heading = abHead; + ptB.heading = abHead; + + for (int i = 0; i <= (int)(glm.Distance(ptA, ptB) / 2); i++) + { + vec3 ptC = new vec3(ptA); + ptC.easting = (Math.Sin(abHead) * 2 * i) + ptA.easting; + ptC.northing = (Math.Cos(abHead) * 2 * i) + ptA.northing; + ptC.heading = abHead; + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(ptC); + } + + int ptCnt = mf.trk.tracksArr[mf.trk.idx].trackPts.Count - 1; + + for (int i = 1; i < 30; i+=2) + { + vec3 pt = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[ptCnt]); + pt.easting += (Math.Sin(pt.heading) * i); + pt.northing += (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt); + } + + vec3 stat = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0]); + + for (int i = 1; i < 30; i += 2) + { + vec3 pt = new vec3(stat); + pt.easting -= (Math.Sin(pt.heading) * i); + pt.northing -= (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Insert(0, pt); + } + + //create a name + mf.trk.tracksArr[mf.trk.idx].name = "AB " + (Math.Round(glm.toDegrees(mf.trk.tracksArr[mf.trk.idx].aveHeading), 1)).ToString(CultureInfo.InvariantCulture) + + "\u00B0" + mf.FindDirection(mf.trk.tracksArr[mf.trk.idx].aveHeading) + DateTime.Now.ToString("hh:mm:ss", CultureInfo.InvariantCulture); + + mf.trk.tracksArr[mf.trk.idx].ptA = ptA; + mf.trk.tracksArr[mf.trk.idx].ptB = ptB; + + mf.trk.tracksArr[mf.trk.idx].moveDistance = 0; + + mf.trk.tracksArr[mf.trk.idx].mode = (int)TrackMode.AB; + + mf.FileSaveTracks(); - mf.bnd.bndList[0].hdLine.Add(pt); - delta = 0; + FixLabelsCurve(); + start = 99999; end = 99999; } } - mf.FileSaveHeadland(); - isClosing = true; - Close(); } - private void btnTurnOffHeadland_Click(object sender, EventArgs e) + private void oglSelf_Paint(object sender, PaintEventArgs e) { - mf.bnd.bndList[0].hdLine?.Clear(); + oglSelf.MakeCurrent(); - mf.FileSaveHeadland(); + GL.Clear(ClearBufferMask.DepthBufferBit | ClearBufferMask.ColorBufferBit); + GL.LoadIdentity(); // Reset The View - isClosing = true; - Close(); - } + //back the camera up + GL.Translate(0, 0, -mf.maxFieldDistance); - private void btnDeletePoints_Click(object sender, EventArgs e) - { - if (end > hdArr.Length) + //translate to that spot in the world + GL.Translate(-mf.fieldCenterX, -mf.fieldCenterY, 0); + + GL.Color3(1, 1, 1); + + //draw all the boundaries + + GL.LineWidth(2); + + for (int j = 0; j < mf.bnd.bndList.Count; j++) { - headLineTemplate.RemoveRange(start, headLineTemplate.Count - start); + if (j == bndSelect) + GL.Color3(0.75f, 0.5f, 0.20f); + else + GL.Color3(0.50f, 0.25f, 0.10f); - int endAdj = end - hdArr.Length; - headLineTemplate.RemoveRange(0, endAdj); + GL.Begin(PrimitiveType.LineLoop); + for (int i = 0; i < mf.bnd.bndList[j].fenceLineEar.Count; i++) + { + GL.Vertex3(mf.bnd.bndList[j].fenceLineEar[i].easting, mf.bnd.bndList[j].fenceLineEar[i].northing, 0); + } + GL.End(); } - else + + //the vehicle + GL.PointSize(8.0f); + GL.Begin(PrimitiveType.Points); + GL.Color3(0.95f, 0.90f, 0.0f); + GL.Vertex3(mf.pivotAxlePos.easting, mf.pivotAxlePos.northing, 0.0); + GL.End(); + + //draw the line building graphics + if (start != 99999 || end != 99999) DrawABTouchLine(); + + //draw the actual built lines + if (start == 99999 && end == 99999) { - headLineTemplate.RemoveRange(start, end - start); + DrawBuiltLines(); } - int bndCount = headLineTemplate.Count; - for (int i = 0; i < bndCount; i++) + GL.Flush(); + oglSelf.SwapBuffers(); + } + + private void DrawBuiltLines() + { + if (mf.trk.tracksArr.Count > 0) { - int j = i + 1; - if (j == bndCount) j = 0; - double distanceSq = glm.DistanceSquared(headLineTemplate[i].easting, headLineTemplate[i].northing, - headLineTemplate[j].easting, headLineTemplate[j].northing); - if (distanceSq > 2.3) + //GL.Enable(EnableCap.LineStipple); + GL.LineStipple(1, 0x7070); + GL.PointSize(4); + + for (int i = 0; i < mf.trk.tracksArr.Count; i++) { - vec3 pointB = new vec3((headLineTemplate[i].easting + headLineTemplate[j].easting) / 2.0, - (headLineTemplate[i].northing + headLineTemplate[j].northing) / 2.0, - headLineTemplate[j].heading); + if (mf.trk.tracksArr[i].mode == (int)TrackMode.bndTrackOuter || + mf.trk.tracksArr[i].mode == (int)TrackMode.bndTrackInner) + continue; + if (mf.trk.tracksArr[i].mode == (int)TrackMode.AB) + { + if (mf.trk.tracksArr[i].isVisible) + GL.Color3(0.973f, 0.19f, 0.10f); + else + GL.Color3(0.3f, 0.1f, 0.80f); + } + else + { + if (mf.trk.tracksArr[i].isVisible) + GL.Color3(0.3f, 0.99f, 0.20f); + else + GL.Color3(0.1f, 0.31f, 0.80f); + } - headLineTemplate.Insert(j, pointB); - bndCount = headLineTemplate.Count; - i--; + GL.Begin(PrimitiveType.Points); + foreach (vec3 item in mf.trk.tracksArr[i].trackPts) + { + GL.Vertex3(item.easting, item.northing, 0); + } + GL.End(); } - } - int cnt = headLineTemplate.Count; - hdArr = new vec3[cnt]; - headLineTemplate.CopyTo(hdArr); + //GL.Disable(EnableCap.LineStipple); - RebuildHeadLineTemplate(); - } + if (mf.trk.idx > -1) + { + GL.LineWidth(8); - private void oglSelf_Load(object sender, EventArgs e) - { - oglSelf.MakeCurrent(); - GL.Enable(EnableCap.CullFace); - GL.CullFace(CullFaceMode.Back); - GL.ClearColor(0.23122f, 0.2318f, 0.2315f, 1.0f); - } + if (mf.trk.tracksArr[mf.trk.idx].isVisible) + GL.Color3(1.0f, 0.0f, 1.0f); + else + GL.Color3(0.3f, 0.3f, 0.80f); - private void oglSelf_Resize(object sender, EventArgs e) - { - oglSelf.MakeCurrent(); - GL.MatrixMode(MatrixMode.Projection); - GL.LoadIdentity(); + GL.Begin(PrimitiveType.LineStrip); + foreach (vec3 item in mf.trk.tracksArr[mf.trk.idx].trackPts) + { + GL.Vertex3(item.easting, item.northing, 0); + } + GL.End(); - //58 degrees view - Matrix4 mat = Matrix4.CreatePerspectiveFieldOfView(1.01f, 1.0f, 1.0f, 20000); - GL.LoadMatrix(ref mat); + GL.PointSize(20); + GL.Color3(0, 0, 0); + GL.Begin(PrimitiveType.Points); + { + GL.Vertex3(mf.trk.tracksArr[mf.trk.idx].ptA.easting, + mf.trk.tracksArr[mf.trk.idx].ptA.northing, + 0); + + GL.Color3(0, 0, 0); + GL.Vertex3(mf.trk.tracksArr[mf.trk.idx].ptB.easting, + mf.trk.tracksArr[mf.trk.idx].ptB.northing, + 0); + } - GL.MatrixMode(MatrixMode.Modelview); - } + GL.End(); - #region Help - private void cboxToolWidths_HelpRequested(object sender, HelpEventArgs hlpevent) - { - MessageBox.Show(gStr.hh_cboxToolWidths, gStr.gsHelp); - } + GL.PointSize(12); + GL.Color3(1.0f, 0.75f, 0.350f); + GL.Begin(PrimitiveType.Points); + { + GL.Vertex3(mf.trk.tracksArr[mf.trk.idx].ptA.easting, + mf.trk.tracksArr[mf.trk.idx].ptA.northing, + 0); + + GL.Color3(0.5f, 0.5f, 1.0f); + GL.Vertex3(mf.trk.tracksArr[mf.trk.idx].ptB.easting, + mf.trk.tracksArr[mf.trk.idx].ptB.northing, + 0); + } - private void nudDistance_HelpRequested(object sender, HelpEventArgs hlpevent) - { - MessageBox.Show(gStr.hh_nudDistance, gStr.gsHelp); + GL.End(); + } + } } - private void btnMakeFixedHeadland_HelpRequested(object sender, HelpEventArgs hlpevent) + private void DrawABTouchLine() { - MessageBox.Show(gStr.hh_btnMakeFixedHeadland, gStr.gsHelp); + GL.Color3(0.65, 0.650, 0.0); + GL.PointSize(16); + GL.Begin(PrimitiveType.Points); + + GL.Color3(0, 0, 0); + if (start != 99999) GL.Vertex3(mf.bnd.bndList[bndSelect].fenceLine[start].easting, mf.bnd.bndList[bndSelect].fenceLine[start].northing, 0); + if (end != 99999) GL.Vertex3(mf.bnd.bndList[bndSelect].fenceLine[end].easting, mf.bnd.bndList[bndSelect].fenceLine[end].northing, 0); + GL.End(); + + GL.PointSize(10); + GL.Begin(PrimitiveType.Points); + + GL.Color3(1.0f, 0.75f, 0.350f); + if (start != 99999) GL.Vertex3(mf.bnd.bndList[bndSelect].fenceLine[start].easting, mf.bnd.bndList[bndSelect].fenceLine[start].northing, 0); + + GL.Color3(0.5f, 0.5f, 1.0f); + if (end != 99999) GL.Vertex3(mf.bnd.bndList[bndSelect].fenceLine[end].easting, mf.bnd.bndList[bndSelect].fenceLine[end].northing, 0); + GL.End(); } - private void nudSetDistance_HelpRequested(object sender, HelpEventArgs hlpevent) + private void DrawSections() { - MessageBox.Show(gStr.hh_nudSetDistance, gStr.gsHelp); + int cnt, step, patchCount; + int mipmap = 8; + + GL.Color3(0.0, 0.0, 0.352); + + //draw patches j= # of sections + for (int j = 0; j < mf.triStrip.Count; j++) + { + //every time the section turns off and on is a new patch + patchCount = mf.triStrip[j].patchList.Count; + + if (patchCount > 0) + { + //for every new chunk of patch + foreach (System.Collections.Generic.List triList in mf.triStrip[j].patchList) + { + //draw the triangle in each triangle strip + GL.Begin(PrimitiveType.TriangleStrip); + cnt = triList.Count; + + //if large enough patch and camera zoomed out, fake mipmap the patches, skip triangles + if (cnt >= (mipmap)) + { + step = mipmap; + for (int i = 1; i < cnt; i += step) + { + GL.Vertex3(triList[i].easting, triList[i].northing, 0); i++; + GL.Vertex3(triList[i].easting, triList[i].northing, 0); i++; + + //too small to mipmap it + if (cnt - i <= (mipmap + 2)) + step = 0; + } + } + else { for (int i = 1; i < cnt; i++) GL.Vertex3(triList[i].easting, triList[i].northing, 0); } + GL.End(); + } + } + } //end of section patches } - private void btnSetDistance_HelpRequested(object sender, HelpEventArgs hlpevent) + private void timer1_Tick(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_btnSetDistance, gStr.gsHelp); + oglSelf.Refresh(); } - private void btnDeletePoints_HelpRequested(object sender, HelpEventArgs hlpevent) + private void btnExit_Click(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_btnDeletePoints, gStr.gsHelp); + Close(); } - private void cboxIsSectionControlled_HelpRequested(object sender, HelpEventArgs hlpevent) + private void btnALength_Click(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_cboxIsSectionControlled, gStr.gsHelp); + if (mf.trk.idx > -1) + { + //and the beginning + vec3 start = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[0]); + + for (int i = 1; i < 50; i+=2) + { + vec3 pt = new vec3(start); + pt.easting -= (Math.Sin(pt.heading) * i); + pt.northing -= (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Insert(0, pt); + } + } } - private void btnReset_HelpRequested(object sender, HelpEventArgs hlpevent) + private void btnBLength_Click(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_btnReset, gStr.gsHelp); + if (mf.trk.idx > -1) + { + int ptCnt = mf.trk.tracksArr[mf.trk.idx].trackPts.Count - 1; + + for (int i = 1; i < 50; i+=2) + { + vec3 pt = new vec3(mf.trk.tracksArr[mf.trk.idx].trackPts[ptCnt]); + pt.easting += (Math.Sin(pt.heading) * i); + pt.northing += (Math.Cos(pt.heading) * i); + mf.trk.tracksArr[mf.trk.idx].trackPts.Add(pt); + } + } } - private void btnTurnOffHeadland_HelpRequested(object sender, HelpEventArgs hlpevent) + private void oglSelf_Resize(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_btnTurnOffHeadland, gStr.gsHelp); + oglSelf.MakeCurrent(); + GL.MatrixMode(MatrixMode.Projection); + GL.LoadIdentity(); + + //58 degrees view + Matrix4 mat = Matrix4.CreatePerspectiveFieldOfView(1.01f, 1.0f, 1.0f, 20000); + GL.LoadMatrix(ref mat); + + GL.MatrixMode(MatrixMode.Modelview); } - private void btnExit_HelpRequested(object sender, HelpEventArgs hlpevent) + private void oglSelf_Load(object sender, EventArgs e) { - MessageBox.Show(gStr.hh_btnExit, gStr.gsHelp); + oglSelf.MakeCurrent(); + GL.Enable(EnableCap.CullFace); + GL.CullFace(CullFaceMode.Back); + GL.ClearColor(0.22f, 0.22f, 0.22f, 1.0f); + GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); } - - #endregion - } -} - -/* - - MessageBox.Show(gStr, gStr.gsHelp); - - DialogResult result2 = MessageBox.Show(gStr, gStr.gsHelp, - MessageBoxButtons.YesNo, MessageBoxIcon.Information); - - if (result2 == DialogResult.Yes) - { - System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=rsJMRZrcuX4"); - } - -*/ +} \ No newline at end of file diff --git a/SourceCode/GPS/Forms/FormHeadland.resx b/SourceCode/GPS/Forms/FormHeadland.resx index 1f666f268..9d24b35ed 100644 --- a/SourceCode/GPS/Forms/FormHeadland.resx +++ b/SourceCode/GPS/Forms/FormHeadland.resx @@ -120,4 +120,7 @@ 17, 17 + + 56 + \ No newline at end of file diff --git a/SourceCode/GPS/Properties/Resources.Designer.cs b/SourceCode/GPS/Properties/Resources.Designer.cs index a732fb168..94122d526 100644 --- a/SourceCode/GPS/Properties/Resources.Designer.cs +++ b/SourceCode/GPS/Properties/Resources.Designer.cs @@ -140,6 +140,16 @@ internal static System.Drawing.Bitmap ABSmooth { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ABSnapNudgeMenu { + get { + object obj = ResourceManager.GetObject("ABSnapNudgeMenu", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/SourceCode/GPS/Properties/Resources.resx b/SourceCode/GPS/Properties/Resources.resx index 3ab58cbee..35e2493c1 100644 --- a/SourceCode/GPS/Properties/Resources.resx +++ b/SourceCode/GPS/Properties/Resources.resx @@ -139,6 +139,9 @@ ..\btnImages\First.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\FileNewAndGo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\Config\ConS_VehicleLines.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -199,9 +202,6 @@ ..\btnImages\FileOpen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\RadiusWheelBase4WD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\SteerOff.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -250,9 +250,6 @@ ..\btnImages\Images\z_Compass.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ABLoadFromKML.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\AddNew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -265,9 +262,6 @@ ..\btnImages\vehiclePage4WD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ToolChkFront.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\SectionOffBoundary.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -292,8 +286,8 @@ ..\btnImages\Config\Brand\AoG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ContourPriorityRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\GuidancePanelBk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\4WD\z_4WDFrontCase.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -307,9 +301,6 @@ ..\btnImages\Camera2D64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\ConSt_Mandatory.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\Config\Tractor\z_TractorKubota.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -325,9 +316,6 @@ ..\btnImages\ArrowRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ABSmooth.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\SteerDriveOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -394,9 +382,6 @@ ..\btnImages\TramAll.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\ConV_MaxAngVel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\ColourPick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -436,9 +421,6 @@ ..\btnImages\FilePrevious.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\4WD\z_4WDRearChallenger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\SectionsExample.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -472,6 +454,9 @@ ..\btnImages\Config\ConS_SourceFix.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ABLineCycleBk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\AutoSteerConf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -487,8 +472,8 @@ ..\btnImages\skull.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\AutoSteerOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\ConS_ImplementSection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\FileSaveAs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -526,15 +511,9 @@ ..\btnImages\WindowMaximize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\SectionMapping.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\VehFileSaveAs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\UpArrow64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\boundaryPause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -565,15 +544,15 @@ ..\btnImages\Images\z_Lift.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\BoundaryDeleteAll.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\Config\ConS_VehicleConfig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Camera3D64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\FlagYel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\FieldClose.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -604,9 +583,6 @@ ..\btnImages\PointStart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\SnapLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\YouSkipOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -628,11 +604,14 @@ ..\btnImages\Images\z_Floor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Sort.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\AgIO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ContourOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ContourPriorityRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\HydraulicLiftOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -655,6 +634,9 @@ ..\btnImages\SectionWidth.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\ConD_AutoDayNight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\RecPath.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -757,6 +739,9 @@ ..\btnImages\ABLatLonLatLon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\MapGray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\Config\ConD_FloorTexture.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -769,9 +754,6 @@ ..\btnImages\GoogleEarth.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\JobNameTime.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\HydDown.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -787,6 +769,12 @@ ..\btnImages\SectionOffBelow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\LetterBBlue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\btnImages\Config\ConD_ExtraGuides.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\Config\ConU_UturnLength.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -868,15 +856,12 @@ ..\btnImages\Config\Harvester\z_HarvesterCase.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\SectionOnBoundary.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\SnapLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\rtk_lost.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\btnImages\Config\ConF_SteerSound.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\ABTrackCurve.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -913,9 +898,6 @@ ..\btnImages\ToolAcceptChange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\Config\Tractor\z_TractorNH.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -943,23 +925,23 @@ ..\btnImages\Boundary.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\SnapRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\Config\tractor-raise.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\Brand\NewHolland.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\WindowDayMode.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\btnImages\Config\ConT_Asymmetric.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\ConS_ModulesSteer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\GuidancePanelBk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ContourOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\BoundaryLoadMultiFromGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -967,6 +949,9 @@ ..\btnImages\Config\ConD_FullScreenBegin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\Brand\Fendt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\GuidanceNudgeZero.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -976,12 +961,21 @@ ..\btnImages\JobActive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Steer\Sf_Stanley.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\btnImages\AutoTrack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\ToolChkTrailing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\HeadlandDeletePoints.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Images\z_4WDRear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\Config\Tractor\z_TractorAoG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1030,8 +1024,8 @@ ..\btnImages\HelpCancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ModePurePursuit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\SectionOnBoundary.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\ZoomIn48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1048,14 +1042,17 @@ ..\btnImages\MakeBoundaryContour.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\FileNewAndGo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\4WD\z_4WDRearChallenger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\SectionMasterOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\Brand\Fendt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Images\z_Turn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\btnImages\Config\ConV_MaxAngVel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\WizWasZeroReset.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1066,17 +1063,20 @@ ..\btnImages\ColorBackGnd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\ConD_AutoDayNight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\AutoSteerOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\4WD\z_4WDRearCase.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\ABLineCycleBk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\UpArrow64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\ConD_ExtraGuides.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ModePurePursuit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\btnImages\ABLoadFromKML.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\Harvester\z_HarvesterJD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1108,6 +1108,9 @@ ..\btnImages\AutoSteerOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\VideoLink.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\btnImages\OK64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1126,8 +1129,8 @@ ..\btnImages\Config\ConSt_Danfoss.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Images\z_Turn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\ConSt_Mandatory.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\ConD_Sky.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1138,14 +1141,14 @@ ..\btnImages\Config\ConMa_LiftLowerTime.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\MapGray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ABSmooth.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Splash.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\LetterBBlue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\WindowDayMode.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Images\z_TurnCancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1180,14 +1183,14 @@ ..\btnImages\Config\ConS_ModulesMachine.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\FlagYel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ToolChkFront.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Sort.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\SectionMapping.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Cancel64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1222,14 +1225,14 @@ ..\btnImages\Config\Harvester\z_HarvesterNH.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Steer\Sf_Stanley.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\BoundaryDeleteAll.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\YouTurnH.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\VideoLink.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Config\ConF_SteerSound.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\Tractor\z_TractorDeutz.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1249,8 +1252,8 @@ ..\btnImages\ABTramLine.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Config\ConS_ImplementSection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\JobNameTime.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\TiltUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1261,19 +1264,19 @@ ..\btnImages\Images\z_Speedo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\Images\z_4WDRear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\RadiusWheelBase4WD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\Config\Tractor\z_TractorFendt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\SnapRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\Help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\btnImages\pathResumeClose.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\btnImages\AutoTrack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\btnImages\ABSnapNudgeMenu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/SourceCode/GPS/btnImages/ABSnapNudgeMenu.png b/SourceCode/GPS/btnImages/ABSnapNudgeMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..304d5ca71f82fd887209ce662e2d3dcd7aca8e0b GIT binary patch literal 4182 zcmV-c5UKBpP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D59>)pK~#8N?OO?W zROPw;&z#valZ7mhgd_yA0|7)3gc1=@6dEen7SLLkdR&E!qka zZ4^Zf5Eg+z*a;*A0)&JFvXXtB%zEa&-^@wKB$H)ENc!~N_j%suKmRf(=llNe`~EfT z|2jA^?H3$m8v6T0>lD^xwH5X;Bx2fMhy(viO#21>t$<3f3g~zAN&)=( zGzBOVvo1kM3iklriZ%EhQ6Xks0=`!cs>N)V=urW9i8qq5;6Ph}>-Z(;Ny4~+A>e5H zqsxc}r}orw-6}x*@m=6NZ~&FL3cXeOtYBpe#cZzug?Tnx6))iNHhYO{P%zU788bhF z$5?xbbM#~ZF|m@8$D<{sF?e>%j0**S#bHa-GQrAC6pPxU%Xgyv<4MMeE-S7TLnKxF z2)=moDE{ih=*U50aVK=C0Q_j+7{2h4pUclooh;3jqR6dr`nuJNt<~QXk}m|jgI*03 zi(BFJooF|0k9qjw_w_TCVv)-jB&lcjNVC0WNYBj=;%e`QJWk_*Qw31tP_Am$UD68+ z=g3ZLd?d|cje9s^j$|L`@0n6(RlNe?x)lobL-Q;FuP<+zH@H-w@Z&y$CAI9A@)IEw zqE z*C_g%?-0Jo85pz@_ib|-w6`d3S z_=HNTUU@=sa5#L3HCk0{6n`!Ld1dM<8MElcHa5JgpLJ5r49eU2LjPi`Pv$qqu`}}p z$HAgbP=^|*#`q(hdd%U#ZDItlSk}NDZE;eb8M?WZx z3)ZK7WchtUn@Kxp4LvL!$ki`-O0n;i#mXHjHD_WLD~E1YkQIonZXl?B-2p$YQTeFi zV6Z3Ga`>VpX#Q@KV`rHekKRzj**W-|z~ENKjUJz*gh*=sn7*)*hSx>ln#oE2wL47l z@4u{DFe+CV#8Z0?zw+f8ZSQH1xw2E2GA*HHF?{)$edgFr^JFKVT%z3W;93&=R?Qih z3NjFi1t0c;ZejI7bIgO)R&5%TV2eKvJ^`)8$Me^gEmEf1geUNvm3eY{<}YdNL;?v# zZOt&I23Sj#)zg7>Ru7x-1oS97ZXPCE*^)RF*(YsKUFvk+K=p+5~_(p3lN-p@ zISh>*-)AFde?4SGPgG**M9x z&pezaH&vKvZUr4WbEM?jeV(jk#dtoSrJJLLo#y!65dQD&g(q}U07b{9^=apGgy7Yi zjFVSjBH@jmZ9vsI)Sb1razr&a-Ts(wPi|oUrWhR$Bb_D7WQ$chQ&F_qUeg&+j1E?? zT=ngFA5QlY2`Lsc3&%0Nl$VryX|=Ow&$f-@ zsJ{@)mo0x=m0Uf5`)M=K8moqVX}qH<-5j;Hk*Q8Vu8tEqr!HUv8W$Z~pY{nRG12gS zi&*S3d?3W1l)EZoB&9DxxT_G9OqGVAnC+z%6FqhMpyB~uG|?d?lp-xiOk&%&EjYO$ zR}o07Ik!+NsM#LVh-NdBd|hny{SNYUo=^atf?#_fAX2aV3cM5ixGNXv4ozF4PAQrB z2MK3gk(e}`N6`e3g5Pwh#S$$uTNEZKUvK8AiW$K(VCu|>nzY}Ht6i$)^oO9hzfz?u z(5&CHz{0qvj7+u+-+fdp?u2d!UHp(fXg9bGq&VO*FiA>=@U3%y+E-W!J`R=-uCCvE zM}ARZ#P#YVXt;q@<9NsQx7of^(03neG3pzoZW? zK;9jk15@z*-OlQ|b%C1&_%^ND$ciR|{|#;eRlzm&&ujFC`IVlUyc&&~On(=65F{&j zADjXH8OnJN=`BHz7I2erH%MD+vYlQhv6#uEpTfq$4w@N!AkZ0k9Zc3eqqz z9}0A9L$NpLD+Q2HH2)_vrxnUvFe0wx`uF4Vi^^u4ySyKH>g8`h8sO=?fRyqNFch2w z-V*es1<){b2&8Qua)lp?u3kNv65>7Zv+?0?=H_HRnwgoIg7WiV>t5h?kY;3 zzES|0d^UWU0+I%d1W%ORJxUw#(7nNn7C#a>f6mlbBSL-0n9b&F)Qv-1BsOKx!(PhV z3iOo%2(6ovYbxCO1XS?Zf-6Oea}%tD4_<)Z};rkLjjUD zPkgBSX2Lf6xYdY?iuxUr5lGh}rRgYbkq2DNxp-}8XyD|C@L;WnTFDBE%A?FC{ikV% zjs+bYyW^rDWpR*uRX78M;oPkeAmtG+(q>1h;3Z zeWid9BoxSKu|%^nS`R$xTiqBGzzKu=BSO5@DkbyMddPSDcw9B%wzyTB*DjqF7aewQ z&gH9#&-`{y=v@;>F&}SDD9=mod3f&h$luJH;ZadlH_>Wk+e*r-Xg%f@`bq&+NFD|$ zn2}G@Bt;k5)N;SHxXg!z4b%n(2QXhBPj)OLCvy6fu_{;wH^|RN;s>dHy|v88OUvLY zQl&zsL_40^4)D=x4jj#DsHtm6ch?H~L;>*Yawvh$`4T{1@DzA#ZpQhB#=6F7!eD<* zKtu>9mr0pYA(xj|)NmtW!WobC!H|%FHsJ}VWB$J0%-d7Lq*9&@fMPPTb383 zH?`Orxrn|Dg0F$;;4i>;!Gub!hi90;)s|=HSCmy$+or7JN5?Rgs_O$`iWN%bjUDjm zlgAD*n#|+Gtjp*V3n0J>nqdXB7w8X80e@bj@rbY>+GW+&W(CBCX#xWV_#m*cm|+w$ zdIujb4cnW3T84P=wOHg5`b+@?D1d?$1wlH^k(qeO;5rYLU#*1OZs9G8@UXyejaucB zRgznjlvf9x&c6IPvQF3h-Jwqv04r#<1X`jV9dotBGVFSFvpNUzQ&@UDs zLR}vkFugo_@SNNUF{1;*2Hk$s@W za%|#^2_M{d*Z7INjF(^{qpz)NG|Hq>kI13Hm;$)gH*c@oQuD>O{WQmL3H{~*nCB~0 zN`*GS-$xP{;L8RF`YVS=5Anph0G;ppXJH~lD@T{%(q9VOa^j|04Ce2b_U}8nV|(gh zy-sI8`69t-hR3-$3J}tcX1P295PGcu2u~+1w2^UBpldNyzjW#PaqEZQ7Oq~pw(P5v zwC1`7hf}Lw<8omMYtb98h*_7=D+NIKAS54ww&NyOfZvKwoiWhL2~#ax`5(@gKJ&)= zn-k_d_S!qEHzZdyHMa;>I+pGwB8LQ%)wp$`s9Ob)$%Aw#LVI;IeRXYsb`2Rdb&bpZ znY??_(@WQ+T*@ytAux(nJtHnMjMf7#`%X_5K&LowgLGNZ-67NA?oKa|mz9(M(33B( z-f=PS+Knq7Jz(^RhSh?hh1it~DE}yjlD?wISUB@toC|kB_BVD_pjnrPlnFWxU zPXpfsJ6=u9u8>x#i(j~A4C1B)Ou7L``Mx-B)m++yjx*U`|Vqb)T3ne59~KHs`` z|LP52QD@PHs!M270QEdb=iswITCd*$c2v+SAdR!9sz+Mel(^o}l%++9UYZG&EKG;Td`B&)Khw8D~p;#|evgBiO&`)b#kcRx;E`mgWy zzff1-LWwSg(~-Tsd_%cjK%gg%5S(tCxHoZVhgJp9pi6u88KB$R>;gYU0j#8~sy6*Z_J<#A-1_H}nU_9BQ5NVl zsJa820>r3IcWCJz%_rjXO+ot+!A+0?>E;OC@A*l}bOwiEP>cl>$sYsh5(BwK`&dAy zyL3v^6=-L68-%7_>Ji-ygM9_3Gbbp5CKR-f|1?NP)2&MQBe=o-*d@$RK(D57|IP}a zBmkuQL4N@0-`Z$$^elvP`Myq9_;*l1d-HAs`7KCSW43@aCmpG%}GQ-RCr$Pn9ohaFc`%H6R-h{z=<>6fIAmPfC)+`U<9~uW(0EP z#0cpI9f9}a&k;gKIEgF#S??!B{-Z|i_p9^lwi7}KA%qY@2!A1jD9QQj$C-7j<<#2Z zp!g>=mtj;dM-hPH@6gl#vpJK59kBOh+#M)U{;0lV4M~TJou=m^>TaA00)O0?4%A1Y<;{r_YZ6X|YsCh2+gRzPbR` z9A8xci;n+_MS|mB2bf+($9?4OZ}+c{s-Cp_Wyenzz`Eln3E;u;Ckx=k@l$3%%kG-309003 zfSm}D#)an1^@s6000000KgFs0R{l3mv$Z!Z2czy0000