-> Initial Commit
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
4
Networking/packages.config
Normal file
4
Networking/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="PTConverter.Plugin" version="1.0.2" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user