Skip to content

Commit

Permalink
Merge pull request #381 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 7.2.0.2211
  • Loading branch information
lpeyr authored Nov 13, 2022
2 parents 65804a9 + f9d7e54 commit 35702f4
Show file tree
Hide file tree
Showing 26 changed files with 257 additions and 113 deletions.
4 changes: 2 additions & 2 deletions InternetTest.Setup/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "InternetTest Pro"
#define MyAppVersion "7.1.0.2209"
#define MyAppFullVersion "7.1.0.2209"
#define MyAppVersion "7.2.0.2211"
#define MyAppFullVersion "7.2.0.2211"
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "InternetTest.exe"
Expand Down
11 changes: 5 additions & 6 deletions InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
using InternetTest.Enums;
using InternetTest.Pages;
using LeoCorpLibrary;
using LeoCorpLibrary.Enums;
using Microsoft.Win32;
using PeyrSharp.Enums;
using PeyrSharp.Env;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -35,13 +35,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace InternetTest.Classes;
public static class Global
{
public static string Version => "7.1.0.2209";
public static string Version => "7.2.0.2211";
public static string LastVersionLink => "https://raw.githubusercontent.com/Leo-Corporation/LeoCorp-Docs/master/Liens/Update%20System/InternetTest/7.0/Version.txt";
public static bool IsConfidentialModeEnabled { get; set; } = false;
public static Settings Settings { get; set; } = SettingsManager.Load();
Expand All @@ -59,7 +58,7 @@ public static class Global
public static IpConfigPage? IpConfigPage { get; set; }
public static WiFiPasswordsPage? WiFiPasswordsPage { get; set; }

internal static string SynethiaPath => $@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\SynethiaConfig.json";
internal static string SynethiaPath => $@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\SynethiaConfig.json";

public static string GetHiSentence
{
Expand Down Expand Up @@ -263,7 +262,7 @@ public static void ChangeTheme()

public static bool IsSystemThemeDark()
{
if (Env.WindowsVersion != WindowsVersion.Windows10 && Env.WindowsVersion != WindowsVersion.Windows11)
if (Sys.CurrentWindowsVersion != WindowsVersion.Windows10 && Sys.CurrentWindowsVersion != WindowsVersion.Windows11)
{
return false; // Avoid errors on older OSs
}
Expand Down
10 changes: 5 additions & 5 deletions InternetTest/InternetTest/Classes/HistoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using LeoCorpLibrary;
using PeyrSharp.Env;
using System.IO;
using System.Text.Json;

namespace InternetTest.Classes
{
public static class HistoryManager
{
internal static string HistoryPath = $@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\History.json";
internal static string HistoryPath = $@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\History.json";
public static History Load()
{
if (!Directory.Exists($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\"))
if (!Directory.Exists($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\"))
{
Directory.CreateDirectory($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\");
Directory.CreateDirectory($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\");
}

if (!File.Exists(HistoryPath))
Expand All @@ -47,7 +47,7 @@ public static History Load()

// If History exists
// Deserialize the file to History (using JSON)
return JsonSerializer.Deserialize<History>(File.ReadAllText(HistoryPath));
return JsonSerializer.Deserialize<History>(File.ReadAllText(HistoryPath)) ?? new();
}

public static void Save(History history)
Expand Down
10 changes: 5 additions & 5 deletions InternetTest/InternetTest/Classes/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using InternetTest.Enums;
using LeoCorpLibrary;
using PeyrSharp.Env;
using System;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -64,12 +64,12 @@ public Settings()

public static class SettingsManager
{
private static string SettingsPath => $@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\Settings.xml";
private static string SettingsPath => $@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\Settings.xml";
public static Settings Load()
{
if (!Directory.Exists($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\"))
if (!Directory.Exists($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\"))
{
Directory.CreateDirectory($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\");
Directory.CreateDirectory($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\");
}

if (!File.Exists(SettingsPath))
Expand All @@ -89,7 +89,7 @@ public static Settings Load()
XmlSerializer xmlDeserializer = new(typeof(Settings));

StreamReader streamReader = new(SettingsPath);
var settings = (Settings)xmlDeserializer.Deserialize(streamReader) ?? new();
var settings = (Settings?)xmlDeserializer.Deserialize(streamReader) ?? new();

// Upgrade the settings file if it comes from an older version
settings.IsMaximized ??= false; // Set the default value if none is specified.
Expand Down
8 changes: 4 additions & 4 deletions InternetTest/InternetTest/Classes/SynethiaManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using LeoCorpLibrary;
using PeyrSharp.Env;
using System.IO;
using System.Text.Json;

Expand All @@ -31,9 +31,9 @@ public static class SynethiaManager
public static SynethiaConfig Load()
{
if (!Global.Settings.UseSynethia) return new();
if (!Directory.Exists($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\"))
if (!Directory.Exists($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\"))
{
Directory.CreateDirectory($@"{Env.AppDataPath}\Léo Corporation\InternetTest Pro\");
Directory.CreateDirectory($@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\");
}

if (!File.Exists(Global.SynethiaPath)) // If no Synethia config exists
Expand All @@ -46,7 +46,7 @@ public static SynethiaConfig Load()

// If Synethia config exists
// Deserialize the file to Synethia config (using JSON)
return JsonSerializer.Deserialize<SynethiaConfig>(File.ReadAllText(Global.SynethiaPath));
return JsonSerializer.Deserialize<SynethiaConfig>(File.ReadAllText(Global.SynethiaPath)) ?? new();
}

public static void Save(SynethiaConfig synethiaConfig)
Expand Down
5 changes: 3 additions & 2 deletions 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>7.1.0.2209</Version>
<Version>7.2.0.2211</Version>
<Copyright>© 2022</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 Expand Up @@ -34,7 +34,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LeoCorpLibrary" Version="4.9.0.2208" />
<PackageReference Include="PeyrSharp.Core" Version="1.0.0.2211" />
<PackageReference Include="PeyrSharp.Env" Version="1.0.0.2211" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 6 additions & 4 deletions InternetTest/InternetTest/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,19 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" FontSize="14" Content="&#xF602;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="PinBtn" Click="PinBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>

<Button Grid.Column="1" FontSize="14" x:Name="ConfidentialModeBtn" Click="ConfidentialModeBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}">
<Button Grid.Column="2" FontSize="14" x:Name="ConfidentialModeBtn" Click="ConfidentialModeBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}">
<Grid>
<TextBlock x:Name="RegularLockTxt" Text="&#xFC25;" FontFamily="/Fonts/#FluentSystemIcons-Regular"/>
<TextBlock x:Name="FilledLockTxt" Text="&#xFC2C;" FontFamily="/Fonts/#FluentSystemIcons-Filled" Visibility="Collapsed"/>
</Grid>
</Button>
<Button Grid.Column="2" FontSize="14" Content="&#xFC75;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="MinimizeBtn" Click="MinimizeBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
<Button Grid.Column="3" FontSize="14" Content="&#xFA40;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="MaximizeRestoreBtn" Click="MaximizeRestoreBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
<Button Grid.Column="4" FontSize="14" Content="&#xF36B;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="CloseBtn" Click="CloseBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarCloseButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
<Button Grid.Column="3" FontSize="14" Content="&#xFC75;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="MinimizeBtn" Click="MinimizeBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
<Button Grid.Column="4" FontSize="14" Content="&#xFA40;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="MaximizeRestoreBtn" Click="MaximizeRestoreBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
<Button Grid.Column="5" FontSize="14" Content="&#xF36B;" FontFamily="/Fonts/#FluentSystemIcons-Regular" x:Name="CloseBtn" Click="CloseBtn_Click" RenderOptions.EdgeMode="Aliased" Style="{StaticResource TitleBarCloseButtonStyle}" Background="Transparent" Width="46" Height="32" Foreground="{Binding Source={StaticResource Foreground1}}"/>
</Grid>
</Border>

Expand Down
Loading

0 comments on commit 35702f4

Please sign in to comment.