Skip to content

Commit

Permalink
Merge pull request #226 from farmerbriantee/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
farmerbriantee authored Nov 12, 2021
2 parents ee0c12c + 15e0320 commit ff93cef
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 375 deletions.
1 change: 1 addition & 0 deletions SourceCode/GPS/AgOpenGPS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\CColorExtensions.cs" />
<Compile Include="Classes\CFence.cs">
<DependentUpon>CBoundary.cs</DependentUpon>
</Compile>
Expand Down
20 changes: 20 additions & 0 deletions SourceCode/GPS/Classes/CColorExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Drawing;

namespace AgOpenGPS
{
public static class CColorExtensions
{
public static Color CheckColorFor255(this Color color)
{
var currentR = color.R;
var currentG = color.G;
var currentB = color.B;

if (currentR == 255) currentR = 254;
if (currentG == 255) currentG = 254;
if (currentB == 255) currentB = 254;

return Color.FromArgb(color.A, currentR, currentG, currentB);
}
}
}
35 changes: 18 additions & 17 deletions SourceCode/GPS/Classes/CTool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using OpenTK.Graphics.OpenGL;

using OpenTK.Graphics.OpenGL;
using System;
using System.Drawing;

Expand Down Expand Up @@ -85,22 +86,22 @@ public CTool(FormGPS _f)
minCoverage = Properties.Vehicle.Default.setVehicle_minCoverage;
isMultiColoredSections = Properties.Settings.Default.setColor_isMultiColorSections;

secColors[0] = Properties.Settings.Default.setColor_sec01;
secColors[1] = Properties.Settings.Default.setColor_sec02;
secColors[2] = Properties.Settings.Default.setColor_sec03;
secColors[3] = Properties.Settings.Default.setColor_sec04;
secColors[4] = Properties.Settings.Default.setColor_sec05;
secColors[5] = Properties.Settings.Default.setColor_sec06;
secColors[6] = Properties.Settings.Default.setColor_sec07;
secColors[7] = Properties.Settings.Default.setColor_sec08;
secColors[8] = Properties.Settings.Default.setColor_sec09;
secColors[9] = Properties.Settings.Default.setColor_sec10;
secColors[10] = Properties.Settings.Default.setColor_sec11;
secColors[11] = Properties.Settings.Default.setColor_sec12;
secColors[12] = Properties.Settings.Default.setColor_sec13;
secColors[13] = Properties.Settings.Default.setColor_sec14;
secColors[14] = Properties.Settings.Default.setColor_sec15;
secColors[15] = Properties.Settings.Default.setColor_sec16;
secColors[0] = Properties.Settings.Default.setColor_sec01.CheckColorFor255();
secColors[1] = Properties.Settings.Default.setColor_sec02.CheckColorFor255();
secColors[2] = Properties.Settings.Default.setColor_sec03.CheckColorFor255();
secColors[3] = Properties.Settings.Default.setColor_sec04.CheckColorFor255();
secColors[4] = Properties.Settings.Default.setColor_sec05.CheckColorFor255();
secColors[5] = Properties.Settings.Default.setColor_sec06.CheckColorFor255();
secColors[6] = Properties.Settings.Default.setColor_sec07.CheckColorFor255();
secColors[7] = Properties.Settings.Default.setColor_sec08.CheckColorFor255();
secColors[8] = Properties.Settings.Default.setColor_sec09.CheckColorFor255();
secColors[9] = Properties.Settings.Default.setColor_sec10.CheckColorFor255();
secColors[10] = Properties.Settings.Default.setColor_sec11.CheckColorFor255();
secColors[11] = Properties.Settings.Default.setColor_sec12.CheckColorFor255();
secColors[12] = Properties.Settings.Default.setColor_sec13.CheckColorFor255();
secColors[13] = Properties.Settings.Default.setColor_sec14.CheckColorFor255();
secColors[14] = Properties.Settings.Default.setColor_sec15.CheckColorFor255();
secColors[15] = Properties.Settings.Default.setColor_sec16.CheckColorFor255();
}

public void DrawTool()
Expand Down
2 changes: 2 additions & 0 deletions SourceCode/GPS/Forms/Controls.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 30 additions & 25 deletions SourceCode/GPS/Forms/GUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions SourceCode/GPS/Forms/Pickers/FormColorPicker.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff93cef

Please sign in to comment.