Skip to content

Commit 8c09c7d

Browse files
committed
Add feature to parse IP by pressing ENTER.
1 parent e69be0a commit 8c09c7d

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

CheckIP/About.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<Grid>
1212
<Label x:Name="labelTitle" Content="CheckIP" HorizontalAlignment="Left" Margin="15,8,0,0" VerticalAlignment="Top" FontSize="20" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>
13-
<Label x:Name="valueVersion" Content="Version: 1.0.0" Margin="15,40,0,0" Foreground="{DynamicResource SystemBaseMediumColorBrush}" Height="19" VerticalAlignment="Top" HorizontalAlignment="Left"/>
13+
<Label x:Name="valueVersion" Content="Version: 1.0.1" Margin="15,40,0,0" Foreground="{DynamicResource SystemBaseMediumColorBrush}" Height="19" VerticalAlignment="Top" HorizontalAlignment="Left"/>
1414
<Label x:Name="valueCopyright" Content="Copyright © 2018 - 2021 Exploitox. All rights reserved." Margin="15,59,0,0" Foreground="{DynamicResource SystemBaseMediumColorBrush}" Height="19" VerticalAlignment="Top" HorizontalAlignment="Left"/>
1515
<TextBlock x:Name="licenseText" Margin="15,92,10,0" Height="268" VerticalAlignment="Top" Foreground="{DynamicResource SystemBaseHighColorBrush}" FontSize="14" AllowDrop="True" TextWrapping="WrapWithOverflow">
1616
This program is free software: you can redistribute it and/or modify

CheckIP/App.xaml.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
4-
using System.Data;
5-
using System.Linq;
6-
using System.Threading.Tasks;
7-
using System.Windows;
1+
using System.Windows;
82

93
namespace CheckIP
104
{

CheckIP/CheckIP.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
<ApplicationIcon>Exploitox - Modern.ico</ApplicationIcon>
88
<Authors>valnoxy</Authors>
99
<Company>Exploitox - Unleash your exploits!</Company>
10-
<Description>Get information about IP addresses</Description>
10+
<Description>Get more information about an IP address.</Description>
1111
<Copyright>Copyright © 2018 - 2021 Exploitox. All rights reserved.</Copyright>
1212
<RepositoryUrl>https://github.com/valnoxy/checkip</RepositoryUrl>
13+
<Version>1.0.1</Version>
1314
</PropertyGroup>
1415

1516
<ItemGroup>

CheckIP/FetchIP.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ui:ProgressRing x:Name="progress" Margin="245,0,0,299" VerticalAlignment="Bottom" HorizontalAlignment="Left" Foreground="{DynamicResource SystemBaseHighColorBrush}" Height="32" Width="32"/>
1313
<Label x:Name="labelTitle" Content="Options" HorizontalAlignment="Left" Margin="15,8,0,0" VerticalAlignment="Top" FontSize="20" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>
1414
<Label Content="IP Address" HorizontalAlignment="Left" Margin="15,45,0,0" VerticalAlignment="Top" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>
15-
<TextBox x:Name="IPaddr" HorizontalAlignment="Left" Margin="15,69,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="271" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>
15+
<TextBox x:Name="IPaddr" HorizontalAlignment="Left" Margin="15,69,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="271" Foreground="{DynamicResource SystemBaseHighColorBrush}" KeyDown="OnKeyDownHandler"/>
1616
<Button Content="Fetch Information" Margin="291,69,0,0" VerticalAlignment="Top" Height="32" Width="130" Foreground="{DynamicResource SystemBaseHighColorBrush}" Click="FetchIP_Click"/>
1717
<Label x:Name="labelTitle2" Content="Information" HorizontalAlignment="Left" Margin="15,118,0,0" VerticalAlignment="Top" FontSize="20" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>
1818
<Label Content="City / Country" HorizontalAlignment="Left" Margin="22,156,0,0" VerticalAlignment="Top" Foreground="{DynamicResource SystemBaseHighColorBrush}"/>

CheckIP/FetchIP.xaml.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Net;
66
using System.Net.Http;
77
using System.Windows;
8+
using System.Windows.Input;
89

910
namespace CheckIP
1011
{
@@ -20,6 +21,19 @@ public FetchIP()
2021
}
2122

2223
private void FetchIP_Click(object sender, RoutedEventArgs e)
24+
{
25+
ParseIPaddr();
26+
}
27+
28+
private void OnKeyDownHandler(object sender, KeyEventArgs e)
29+
{
30+
if (e.Key == Key.Return)
31+
{
32+
ParseIPaddr();
33+
}
34+
}
35+
36+
private void ParseIPaddr()
2337
{
2438
progress.IsActive = true;
2539
progress.Visibility = Visibility.Visible;

CheckIP/MainWindow.xaml.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
using ModernWpf.Controls;
22
using System;
3-
using System.Collections.Generic;
4-
using System.Diagnostics;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
83
using System.Windows;
94
using System.Windows.Controls;
10-
using System.Windows.Data;
11-
using System.Windows.Documents;
12-
using System.Windows.Input;
13-
using System.Windows.Media;
14-
using System.Windows.Media.Imaging;
15-
using System.Windows.Navigation;
16-
using System.Windows.Shapes;
175

186
namespace CheckIP
197
{

0 commit comments

Comments
 (0)