Skip to content

Commit

Permalink
Merge pull request #546 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 8.1.0.2402
  • Loading branch information
lpeyr authored Feb 4, 2024
2 parents 74d9b23 + f953a6c commit c347dff
Show file tree
Hide file tree
Showing 24 changed files with 586 additions and 99 deletions.
4 changes: 2 additions & 2 deletions InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public static class Global
#if NIGHTLY
private static DateTime Date => System.IO.File.GetLastWriteTime(System.Reflection.Assembly.GetEntryAssembly().Location);

public static string Version => $"8.0.3.2401-nightly{Date:yyMM.dd@HHmm}";
public static string Version => $"8.1.0.2402-nightly{Date:yyMM.dd@HHmm}";

#else
public static string Version => "8.0.3.2401";
public static string Version => "8.1.0.2402";
#endif
public static string LastVersionLink => "https://raw.githubusercontent.com/Leo-Corporation/LeoCorp-Docs/master/Liens/Update%20System/InternetTest/7.0/Version.txt";
internal static string SynethiaPath => $@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\NewSynethiaConfig.json";
Expand Down
2 changes: 1 addition & 1 deletion InternetTest/InternetTest/InternetTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms>
<Version>8.0.3.2401</Version>
<Version>8.1.0.2402</Version>
<Copyright>© 2024</Copyright>
<Company>Léo Corporation</Company>
<Description>Taking you to another level. InternetTest can locate IP addresses, send ping request, recover your WiFi passwords and more!</Description>
Expand Down
6 changes: 4 additions & 2 deletions InternetTest/InternetTest/Pages/DnsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
BorderThickness="0"
FontWeight="Bold"
Foreground="{DynamicResource DarkGray}"
Keyboard.KeyUp="SiteTxt_KeyUp" />
Keyboard.KeyUp="SiteTxt_KeyUp"
TextChanged="SiteTxt_TextChanged" />
<Button
x:Name="DismissBtn"
Grid.Column="1"
Expand All @@ -86,7 +87,8 @@
Content="&#xF36A;"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground1}"
Style="{DynamicResource ToolButton}" />
Style="{DynamicResource ToolButton}"
Visibility="Collapsed" />
</Grid>
</Border>
<Button
Expand Down
5 changes: 5 additions & 0 deletions InternetTest/InternetTest/Pages/DnsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,9 @@ private void SiteTxt_KeyUp(object sender, KeyEventArgs e)
GetDnsInfoBtn_Click(sender, e);
}
}

private void SiteTxt_TextChanged(object sender, TextChangedEventArgs e)
{
DismissBtn.Visibility = SiteTxt.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
}
}
6 changes: 4 additions & 2 deletions InternetTest/InternetTest/Pages/DownDetectorPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
BorderThickness="0"
FontWeight="Bold"
Foreground="{DynamicResource DarkGray}"
Keyboard.KeyUp="WebsiteTxt_KeyUp" />
Keyboard.KeyUp="WebsiteTxt_KeyUp"
TextChanged="WebsiteTxt_TextChanged" />
<Button
x:Name="ClearBtn"
Grid.Column="1"
Expand All @@ -89,7 +90,8 @@
Content="&#xF36A;"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground1}"
Style="{DynamicResource ToolButton}" />
Style="{DynamicResource ToolButton}"
Visibility="Collapsed" />
</Grid>
</Border>
<Button
Expand Down
7 changes: 6 additions & 1 deletion InternetTest/InternetTest/Pages/DownDetectorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,10 @@ private void LaunchTimerBtn_Click(object sender, RoutedEventArgs e)
LaunchTimerBtn.Content = Properties.Resources.LaunchScheduledTest;
}
}
}

private void WebsiteTxt_TextChanged(object sender, TextChangedEventArgs e)
{
ClearBtn.Visibility = WebsiteTxt.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
}
}
}
3 changes: 2 additions & 1 deletion InternetTest/InternetTest/Pages/HistoryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@
Content="&#xF36A;"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground1}"
Style="{DynamicResource ToolButton}" />
Style="{DynamicResource ToolButton}"
Visibility="Collapsed" />
</Grid>
</Border>
<Button
Expand Down
1 change: 1 addition & 0 deletions InternetTest/InternetTest/Pages/HistoryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ private void SearchTxt_TextChanged(object sender, TextChangedEventArgs e)
return;
}
SearchHistory(SearchTxt.Text);
DismissBtn.Visibility = SearchTxt.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
}

internal void SearchHistory(string req)
Expand Down
115 changes: 115 additions & 0 deletions InternetTest/InternetTest/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,65 @@
Text="{x:Static lang:Resources.ConnectWiFi}" />
</StackPanel>

<StackPanel
x:Name="WiFiQuickActionPlaceholder"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed">
<TextBlock
HorizontalAlignment="Center"
FontFamily="..\Fonts\#FluentSystemIcons-Regular"
FontSize="24"
Foreground="{DynamicResource Accent}"
Text="&#xFB69;" />
<TextBlock
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{x:Static lang:Resources.NoNetworks}"
TextAlignment="Center" />
</StackPanel>
<StackPanel
x:Name="WiFiQuickActionLoader"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed">
<TextBlock
HorizontalAlignment="Center"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
FontSize="48"
Foreground="{DynamicResource Accent}"
RenderTransformOrigin="0.5,0.5"
Text="&#xF709;">
<TextBlock.RenderTransform>
<RotateTransform x:Name="SpinTransform" Angle="0" />
</TextBlock.RenderTransform>

<TextBlock.Triggers>
<EventTrigger RoutedEvent="TextBlock.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="SpinTransform"
Storyboard.TargetProperty="Angle"
From="0"
To="360"
Duration="0:0:1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock.Triggers>
</TextBlock>
<TextBlock
FontWeight="Bold"
Text="{x:Static lang:Resources.ScanningInProgress}"
TextAlignment="Center" />
</StackPanel>

<ScrollViewer
x:Name="WiFiQuickAction"
Grid.Row="1"
HorizontalScrollBarVisibility="Disabled"
Style="{DynamicResource ScrollViewerStyle}">
Expand Down Expand Up @@ -538,11 +596,68 @@
</StackPanel>

<ScrollViewer
x:Name="WiFiPasswordQuickAction"
Grid.Row="1"
HorizontalScrollBarVisibility="Disabled"
Style="{DynamicResource ScrollViewerStyle}">
<StackPanel x:Name="WiFiItemDisplayer" />
</ScrollViewer>
<StackPanel
x:Name="PasswordQuickActionPlaceholder"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed">
<TextBlock
HorizontalAlignment="Center"
FontFamily="..\Fonts\#FluentSystemIcons-Regular"
FontSize="24"
Foreground="{DynamicResource Accent}"
Text="&#xF59E;" />
<TextBlock
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{x:Static lang:Resources.NoWiFIPasswordsFound}"
TextAlignment="Center" />
</StackPanel>
<StackPanel
x:Name="PasswordQuickActionLoader"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed">
<TextBlock
HorizontalAlignment="Center"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
FontSize="48"
Foreground="{DynamicResource Accent}"
RenderTransformOrigin="0.5,0.5"
Text="&#xF709;">
<TextBlock.RenderTransform>
<RotateTransform x:Name="SpinTransform2" Angle="0" />
</TextBlock.RenderTransform>

<TextBlock.Triggers>
<EventTrigger RoutedEvent="TextBlock.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="SpinTransform2"
Storyboard.TargetProperty="Angle"
From="0"
To="360"
Duration="0:0:1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock.Triggers>
</TextBlock>
<TextBlock
FontWeight="Bold"
Text="{x:Static lang:Resources.SearchingForWiFiPasswords}"
TextAlignment="Center" />
</StackPanel>
<Button
x:Name="ClosePasswordBtn"
Grid.Row="2"
Expand Down
32 changes: 31 additions & 1 deletion InternetTest/InternetTest/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,29 @@ private async void ConnectWiFi_MouseLeftButtonUp(object sender, System.Windows.I
ConnectPopup.IsOpen = true;
SpeedTestPopup.IsOpen = false;
PasswordPopup.IsOpen = false;

WiFiDisplayer.Children.Clear();
WiFiQuickActionLoader.Visibility = Visibility.Visible;
WiFiQuickAction.Visibility = Visibility.Collapsed;
WiFiQuickActionPlaceholder.Visibility = Visibility.Collapsed;

await NativeWifi.ScanNetworksAsync(TimeSpan.FromSeconds(10));
var wifis = Global.GetWiFis();
for (int i = 0; i < wifis.Count; i++)
{
WiFiDisplayer.Children.Add(new WiFiNetworkItem(wifis[i]));
}
if (WiFiDisplayer.Children.Count > 0)
{
WiFiQuickActionPlaceholder.Visibility = Visibility.Collapsed;
WiFiQuickAction.Visibility = Visibility.Visible;
}
else
{
WiFiQuickActionPlaceholder.Visibility = Visibility.Visible;
WiFiQuickAction.Visibility = Visibility.Collapsed;
}
WiFiQuickActionLoader.Visibility = Visibility.Collapsed;
}
catch
{
Expand Down Expand Up @@ -239,6 +255,9 @@ async Task GetWiFiNetworksInfo()
try
{
WiFiItemDisplayer.Children.Clear(); // Clear the panel
PasswordQuickActionLoader.Visibility = Visibility.Visible;
WiFiPasswordQuickAction.Visibility = Visibility.Collapsed;
PasswordQuickActionPlaceholder.Visibility = Visibility.Collapsed;

// Check if the temp directory exists
string path = FileSys.AppDataPath + @"\Léo Corporation\InternetTest Pro\Temp";
Expand Down Expand Up @@ -276,7 +295,18 @@ async Task GetWiFiNetworksInfo()
File.Delete(files[i]); // Remove the temp file

}
Directory.Delete(path); // Delete the temp directory
Directory.Delete(path); // Delete the temp directory
if (WiFiItemDisplayer.Children.Count > 0)
{
PasswordQuickActionPlaceholder.Visibility = Visibility.Collapsed;
WiFiPasswordQuickAction.Visibility = Visibility.Visible;
}
else
{
PasswordQuickActionPlaceholder.Visibility = Visibility.Visible;
WiFiPasswordQuickAction.Visibility = Visibility.Collapsed;
}
PasswordQuickActionLoader.Visibility = Visibility.Collapsed;
}
catch (Exception ex)
{
Expand Down
6 changes: 4 additions & 2 deletions InternetTest/InternetTest/Pages/TraceroutePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
BorderThickness="0"
FontWeight="Bold"
Foreground="{DynamicResource DarkGray}"
Keyboard.KeyUp="AddressTxt_KeyUp" />
Keyboard.KeyUp="AddressTxt_KeyUp"
TextChanged="AddressTxt_TextChanged" />
<Button
x:Name="DismissBtn"
Grid.Column="1"
Expand All @@ -86,7 +87,8 @@
Content="&#xF36A;"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground1}"
Style="{DynamicResource ToolButton}" />
Style="{DynamicResource ToolButton}"
Visibility="Collapsed" />
</Grid>
</Border>
<Button
Expand Down
5 changes: 5 additions & 0 deletions InternetTest/InternetTest/Pages/TraceroutePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,9 @@ private void AddressTxt_KeyUp(object sender, System.Windows.Input.KeyEventArgs e
TraceBtn_Click(sender, e);
}
}

private void AddressTxt_TextChanged(object sender, TextChangedEventArgs e)
{
DismissBtn.Visibility = AddressTxt.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
}
}
5 changes: 3 additions & 2 deletions InternetTest/InternetTest/Pages/WiFiNetworksPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<TextBox
x:Name="SearchTxt"
Margin="5 0"
Padding="1"
Padding="1 4"
VerticalAlignment="Center"
d:Text="123.54.132.56"
Background="Transparent"
Expand All @@ -149,7 +149,8 @@
Content="&#xF36A;"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
Foreground="{DynamicResource Foreground1}"
Style="{DynamicResource ToolButton}" />
Style="{DynamicResource ToolButton}"
Visibility="Collapsed" />
</Grid>
</Border>
</StackPanel>
Expand Down
1 change: 1 addition & 0 deletions InternetTest/InternetTest/Pages/WiFiNetworksPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private void ShowHiddenChk_Checked(object sender, RoutedEventArgs e)
private void SearchTxt_TextChanged(object sender, TextChangedEventArgs e)
{
Search(SearchTxt.Text);
DismissBtn.Visibility = SearchTxt.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
}

private void Search(string query)
Expand Down
Loading

0 comments on commit c347dff

Please sign in to comment.