Skip to content

Commit

Permalink
Merge pull request #298 from farmerbriantee/Five7_Fixes
Browse files Browse the repository at this point in the history
Five7 fixes
  • Loading branch information
farmerbriantee authored Feb 2, 2023
2 parents ea2aa5c + c0882d1 commit 679475a
Show file tree
Hide file tree
Showing 50 changed files with 3,464 additions and 850 deletions.
45 changes: 45 additions & 0 deletions SourceCode/AgIO/Source/AgIO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
<Compile Include="Forms\FormCommSetGPS.Designer.cs">
<DependentUpon>FormCommSetGPS.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormSerialMonitor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormSerialMonitor.designer.cs">
<DependentUpon>FormSerialMonitor.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormGPSData.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -126,6 +132,24 @@
<Compile Include="Forms\FormSerialPass.designer.cs">
<DependentUpon>FormSerialPass.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormEthernet.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormEthernet.designer.cs">
<DependentUpon>FormEthernet.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormYes.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormYes.designer.cs">
<DependentUpon>FormYes.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormYesNo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormYesNo.designer.cs">
<DependentUpon>FormYesNo.cs</DependentUpon>
</Compile>
<Compile Include="Forms\NMEA.Designer.cs">
<DependentUpon>FormLoop.cs</DependentUpon>
</Compile>
Expand Down Expand Up @@ -163,14 +187,19 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Forms\FormCommPicker.resx">
<DependentUpon>FormCommPicker.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormCommSaver.resx">
<DependentUpon>FormCommSaver.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormCommSetGPS.resx">
<DependentUpon>FormCommSetGPS.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormSerialMonitor.resx">
<DependentUpon>FormSerialMonitor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormGPSData.resx">
<DependentUpon>FormGPSData.cs</DependentUpon>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -199,6 +228,18 @@
<EmbeddedResource Include="Forms\FormSerialPass.resx">
<DependentUpon>FormSerialPass.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormEthernet.resx">
<DependentUpon>FormEthernet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormYes.resx">
<DependentUpon>FormYes.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormYesNo.resx">
<DependentUpon>FormYesNo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormtimedMessage.resx">
<DependentUpon>FormTimedMessage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormUDP.resx">
<DependentUpon>FormUDP.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -280,6 +321,10 @@
</ItemGroup>
<ItemGroup>
<Content Include="AgIO_ico.ico" />
<None Include="btnImages\Help.png" />
<None Include="btnImages\ConSt_Mandatory.png" />
<None Include="btnImages\back-button.png" />
<None Include="btnImages\SubnetSend.png" />
<None Include="btnImages\Nmea.png" />
<None Include="btnImages\ConS_ImplementAntenna.png" />
<None Include="btnImages\ScanNetwork.png" />
Expand Down
17 changes: 16 additions & 1 deletion SourceCode/AgIO/Source/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<value>True</value>
</setting>
<setting name="setNTRIP_sendToUDP" serializeAs="String">
<value>False</value>
<value>True</value>
</setting>
<setting name="setUDP_isUsePluginApp" serializeAs="String">
<value>False</value>
Expand Down Expand Up @@ -181,6 +181,21 @@
<setting name="etIP_SubnetThree" serializeAs="String">
<value>5</value>
</setting>
<setting name="eth_loopOne" serializeAs="String">
<value>127</value>
</setting>
<setting name="eth_loopTwo" serializeAs="String">
<value>255</value>
</setting>
<setting name="eth_loopThree" serializeAs="String">
<value>255</value>
</setting>
<setting name="eth_loopFour" serializeAs="String">
<value>255</value>
</setting>
<setting name="Setting" serializeAs="String">
<value />
</setting>
</AgIO.Properties.Settings>
</userSettings>
</configuration>
50 changes: 29 additions & 21 deletions SourceCode/AgIO/Source/Forms/Controls.Designer.cs

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

116 changes: 116 additions & 0 deletions SourceCode/AgIO/Source/Forms/FormEthernet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Windows.Forms;

namespace AgIO
{
public partial class FormEthernet : Form
{
//class variables
private readonly FormLoop mf = null;

public FormEthernet(Form callingForm)
{
//get copy of the calling main form
mf = callingForm as FormLoop;
InitializeComponent();

nudFirstIP.Controls[0].Enabled = false;
nudSecndIP.Controls[0].Enabled = false;
nudThirdIP.Controls[0].Enabled = false;
}

private void FormUDp_Load(object sender, EventArgs e)
{

cboxIsUDPOn.Checked = Properties.Settings.Default.setUDP_isOn;
cboxPlugin.Checked = Properties.Settings.Default.setUDP_isUsePluginApp;
cboxIsSendNMEAToUDP.Checked = Properties.Settings.Default.setUDP_isSendNMEAToUDP;

//nudSub1.Value = Properties.Settings.Default.etIP_SubnetOne;
//nudSub2.Value = Properties.Settings.Default.etIP_SubnetTwo;
//nudSub3.Value = Properties.Settings.Default.etIP_SubnetThree;

nudFirstIP.Value = Properties.Settings.Default.eth_loopOne;
nudSecndIP.Value = Properties.Settings.Default.eth_loopTwo;
nudThirdIP.Value = Properties.Settings.Default.eth_loopThree;
nudFourthIP.Value= Properties.Settings.Default.eth_loopFour;

if (!cboxIsUDPOn.Checked) cboxIsUDPOn.BackColor = System.Drawing.Color.Salmon;
}

private void nudFirstIP_Click(object sender, EventArgs e)
{
mf.KeypadToNUD((NumericUpDown)sender, this);
}

private void btnSerialCancel_Click(object sender, EventArgs e)
{
//Properties.Settings.Default.etIP_SubnetOne = (byte)nudSub1.Value;
//Properties.Settings.Default.etIP_SubnetTwo = (byte)nudSub2.Value;
//Properties.Settings.Default.etIP_SubnetThree = (byte)nudSub3.Value;

Properties.Settings.Default.eth_loopOne = (byte)nudFirstIP.Value;
Properties.Settings.Default.eth_loopTwo = (byte)nudSecndIP.Value;
Properties.Settings.Default.eth_loopThree = (byte)nudThirdIP.Value;
Properties.Settings.Default.eth_loopFour = (byte)nudFourthIP.Value;

Properties.Settings.Default.setUDP_isOn = cboxIsUDPOn.Checked;
Properties.Settings.Default.setUDP_isUsePluginApp = cboxPlugin.Checked;
Properties.Settings.Default.setUDP_isSendNMEAToUDP = cboxIsSendNMEAToUDP.Checked;

Properties.Settings.Default.Save();

mf.YesMessageBox("AgIO will Restart to Enable UDP Networking Features");

Application.Restart();
Environment.Exit(0);
Close();

}

private void btnHelp_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(gStr.gsEthernetHelp);
}


////get the ipv4 address only
//public void GetIP4AddressList()
//{
// tboxNets.Text = "";
// foreach (IPAddress IPA in Dns.GetHostAddresses(Dns.GetHostName()))
// {
// if (IPA.AddressFamily == AddressFamily.InterNetwork)
// {
// tboxNets.Text += IPA.ToString() + "\r\n";
// }
// }
//}

//public void IsValidNetworkFound()
//{
// foreach (IPAddress IPA in Dns.GetHostAddresses(Dns.GetHostName()))
// {
// if (IPA.AddressFamily == AddressFamily.InterNetwork)
// {
// byte[] data = IPA.GetAddressBytes();
// // Split string by ".", check that array length is 3
// if (data[0] == 192 && data[1] == 168 && data[2] == 1)
// {
// if (data[3] < 255 && data[3] > 1)
// {
// break;
// }
// }
// }
// }
//}
}
}
Loading

0 comments on commit 679475a

Please sign in to comment.