-> Initial Commit

This commit is contained in:
Kevin Krüger
2021-11-25 14:39:39 +01:00
parent 74a039d2df
commit 1dc3d93edf
5 changed files with 34 additions and 11 deletions

View File

@@ -42,6 +42,9 @@ namespace Networking
public IPage Page => this;
#endregion
private string _ipAddress = "0.0.0.0";
private string IPAddress { get => tbIPAddressP1.Text + "." + tbIPAddressP2.Text + "." + tbIPAddressP3.Text + "." + tbIPAddressP4.Text; set => _ipAddress = value; }
public Networking_IPv4()
{
InitializeComponent();
@@ -65,7 +68,7 @@ namespace Networking
{
try
{
ip = new IPTool(tbIPAddress.Text);
ip = new IPTool(IPAddress);
fillIPCalc();
}
catch (Exception e)
@@ -247,19 +250,19 @@ namespace Networking
switch (tbNETClass.SelectedIndex)
{
case 0:
tbIPAddress.Text = "1.0.0.1";
IPAddress = "1.0.0.1";
break;
case 1:
tbIPAddress.Text = "128.0.0.1";
IPAddress = "128.0.0.1";
break;
case 2:
tbIPAddress.Text = "192.0.0.1";
IPAddress = "192.0.0.1";
break;
case 3:
tbIPAddress.Text = "224.0.0.1";
IPAddress = "224.0.0.1";
break;
case 4:
tbIPAddress.Text = "240.0.0.1";
IPAddress = "240.0.0.1";
break;
}
@@ -291,7 +294,7 @@ namespace Networking
return;
}
ip = newIp;
tbIPAddress.Text = ip.getIp();
IPAddress = ip.getIp();
}
catch (System.FormatException)
{
@@ -331,7 +334,7 @@ namespace Networking
return;
}
ip = newIp;
tbIPAddress.Text = ip.getIp();
IPAddress = ip.getIp();
}
catch (System.FormatException)
{