-> 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

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1684
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Networking", "Networking\Networking.csproj", "{85D8795C-E9DC-4A59-B669-E2A8EEAC7A9E}"
EndProject

View File

@@ -8,7 +8,7 @@
d:DesignHeight="450" d:DesignWidth="800" Background="White">
<Grid>
<ComboBox x:Name="tbNETClass" HorizontalAlignment="Left" Margin="328,61,0,0" VerticalAlignment="Top" Width="266" SelectionChanged="netClassComboBox_SelectedIndexChanged"/>
<TextBox x:Name="tbIPAddress" HorizontalAlignment="Left" Height="23" Margin="39,59,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="185" KeyDown="ipAddress_KeyDown" />
<TextBox x:Name="tbIPAddressP1" Text="255" HorizontalAlignment="Left" Height="23" Margin="39,58,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="28" KeyDown="ipAddress_KeyDown" />
<ComboBox x:Name="prefixComboBox" HorizontalAlignment="Left" Margin="134,177,0,0" VerticalAlignment="Top" Width="99" Height="28" SelectionChanged="prefixComboBox_SelectedIndexChanged"/>
<ComboBox x:Name="netMaskComboBox" HorizontalAlignment="Left" Margin="328,177,0,0" VerticalAlignment="Top" Width="266" Height="28" SelectionChanged="netMaskComboBox_SelectedIndexChanged"/>
<CheckBox x:Name="firstBitCheckBox" Content="Allow 1st subnet-BIT" HorizontalAlignment="Left" Margin="654,177,0,0" VerticalAlignment="Top"/>
@@ -30,5 +30,12 @@
<Label Content="IP:" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Margin="10,55,0,0" VerticalAlignment="Top" Height="28" Width="24"/>
<Label Content="Network-Type:" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Margin="238,58,0,0" VerticalAlignment="Top" Width="90" Height="24"/>
<Button Content="Show next subnet with this number of hosts" x:Name="btnNextSubnet" HorizontalAlignment="Left" Margin="333,383,0,0" VerticalAlignment="Top" Width="261" Click="btnNextSubnet_Click"/>
<TextBox x:Name="tbIPAddressP2" Text="255" HorizontalAlignment="Left" Height="23" Margin="72,58,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="28" KeyDown="ipAddress_KeyDown" />
<TextBox x:Name="tbIPAddressP3" Text="255" HorizontalAlignment="Left" Height="23" Margin="105,58,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="28" KeyDown="ipAddress_KeyDown" />
<TextBox x:Name="tbIPAddressP4" Text="255" HorizontalAlignment="Left" Height="23" Margin="138,58,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="28" KeyDown="ipAddress_KeyDown" />
<Label Content=".
" HorizontalAlignment="Left" Margin="68,59,0,0" Padding="0" VerticalAlignment="Top" Width="3"/>
<Label Content=". " HorizontalAlignment="Left" Margin="101,59,0,0" Padding="0" VerticalAlignment="Top" Width="3"/>
<Label Content=". " HorizontalAlignment="Left" Margin="134,59,0,0" Padding="0" VerticalAlignment="Top" Width="3"/>
</Grid>
</UserControl>

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)
{

View File

@@ -30,9 +30,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="PTConverter.Plugin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PTConverter.Plugin.1.0.2\lib\net472\PTConverter.Plugin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
@@ -60,5 +66,8 @@
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PTConverter.Plugin" version="1.0.2" targetFramework="net472" />
</packages>