diff --git a/InternetTest.Setup/Setup.iss b/InternetTest.Setup/Setup.iss index a7dc3028..f7aadca7 100644 --- a/InternetTest.Setup/Setup.iss +++ b/InternetTest.Setup/Setup.iss @@ -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 "Lo Corporation" #define MyAppURL "https://leocorporation.dev/" #define MyAppExeName "InternetTest.exe" diff --git a/InternetTest/InternetTest/Classes/Global.cs b/InternetTest/InternetTest/Classes/Global.cs index 1863a79e..d3977ee5 100644 --- a/InternetTest/InternetTest/Classes/Global.cs +++ b/InternetTest/InternetTest/Classes/Global.cs @@ -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; @@ -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(); @@ -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 { @@ -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 } diff --git a/InternetTest/InternetTest/Classes/HistoryManager.cs b/InternetTest/InternetTest/Classes/HistoryManager.cs index 90f578d5..78c3d164 100644 --- a/InternetTest/InternetTest/Classes/HistoryManager.cs +++ b/InternetTest/InternetTest/Classes/HistoryManager.cs @@ -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; @@ -29,12 +29,12 @@ 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)) @@ -47,7 +47,7 @@ public static History Load() // If History exists // Deserialize the file to History (using JSON) - return JsonSerializer.Deserialize(File.ReadAllText(HistoryPath)); + return JsonSerializer.Deserialize(File.ReadAllText(HistoryPath)) ?? new(); } public static void Save(History history) diff --git a/InternetTest/InternetTest/Classes/Settings.cs b/InternetTest/InternetTest/Classes/Settings.cs index a81a96c2..d66a8aaf 100644 --- a/InternetTest/InternetTest/Classes/Settings.cs +++ b/InternetTest/InternetTest/Classes/Settings.cs @@ -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; @@ -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)) @@ -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. diff --git a/InternetTest/InternetTest/Classes/SynethiaManager.cs b/InternetTest/InternetTest/Classes/SynethiaManager.cs index e8bf2e1e..4771b203 100644 --- a/InternetTest/InternetTest/Classes/SynethiaManager.cs +++ b/InternetTest/InternetTest/Classes/SynethiaManager.cs @@ -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; @@ -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 @@ -46,7 +46,7 @@ public static SynethiaConfig Load() // If Synethia config exists // Deserialize the file to Synethia config (using JSON) - return JsonSerializer.Deserialize(File.ReadAllText(Global.SynethiaPath)); + return JsonSerializer.Deserialize(File.ReadAllText(Global.SynethiaPath)) ?? new(); } public static void Save(SynethiaConfig synethiaConfig) diff --git a/InternetTest/InternetTest/InternetTest.csproj b/InternetTest/InternetTest/InternetTest.csproj index f33de376..d6500bc1 100644 --- a/InternetTest/InternetTest/InternetTest.csproj +++ b/InternetTest/InternetTest/InternetTest.csproj @@ -6,7 +6,7 @@ enable true True - 7.1.0.2209 + 7.2.0.2211 © 2022 Léo Corporation Taking you to another level. InternetTest can locate IP addresses, send ping request, recover your WiFi passwords and more! @@ -34,7 +34,8 @@ - + + diff --git a/InternetTest/InternetTest/MainWindow.xaml b/InternetTest/InternetTest/MainWindow.xaml index 2a8059cd..d9d1c500 100644 --- a/InternetTest/InternetTest/MainWindow.xaml +++ b/InternetTest/InternetTest/MainWindow.xaml @@ -102,17 +102,19 @@ + + -