Skip to content

Commit

Permalink
Added official Synethia implementation (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Dec 26, 2023
1 parent 43d46dd commit 77da1f8
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 502 deletions.
3 changes: 2 additions & 1 deletion InternetTest/InternetTest/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
using InternetTest.Classes;
using InternetTest.Windows;
using Synethia;
using System.Windows;

namespace InternetTest;
Expand Down Expand Up @@ -67,7 +68,7 @@ private void Application_Startup(object sender, StartupEventArgs e)

private void Application_Exit(object sender, ExitEventArgs e)
{
SynethiaManager.Save(Global.SynethiaConfig);
SynethiaManager.Save(Global.SynethiaConfig, Global.SynethiaPath);
HistoryManager.Save(Global.History);
SettingsManager.Save();
}
Expand Down
82 changes: 44 additions & 38 deletions InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using PeyrSharp.Core.Maths;
using PeyrSharp.Enums;
using PeyrSharp.Env;
using Synethia;
using System;
using System.Collections.Generic;
using System.IO;
Expand All @@ -54,9 +55,35 @@ public static class Global
public static string Version => "7.9.1.2310";
#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";
public static bool IsConfidentialModeEnabled { get; set; } = false;
public static Settings Settings { get; set; } = SettingsManager.Load();
public static SynethiaConfig SynethiaConfig { get; set; } = SynethiaManager.Load();
public static SynethiaConfig SynethiaConfig { get; set; } = SynethiaManager.Load(SynethiaPath, DefaultConfig);
public static SynethiaConfig DefaultConfig => new()
{
PagesInfo = new()
{
new("DownDetector"),
new("DNS"),
new("WiFiNetworks"),
new("LocateIP"),
new("IPConfig"),
new("Ping"),
new("Traceroute"),
new("WiFiPasswords"),
},
ActionsInfo = new()
{
new(0, "DownDetector.Test"),
new(1, "DNS.GetInfo"),
new(2, "WiFiNetworks.Scan"),
new(3, "LocateIP.Locate"),
new(4, "IPConfig.Get"),
new(5, "Ping.Execute"),
new(6, "Traceroute.Execute"),
new(7, "WiFiPasswords.Get"),
}
};
public static History History { get; set; } = HistoryManager.Load();

public static HomePage? HomePage { get; set; }
Expand All @@ -71,8 +98,6 @@ public static class Global
public static TraceroutePage? TraceroutePage { get; set; }
public static WiFiNetworksPage? WiFiNetworksPage { get; set; }

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

public static string GetHiSentence
{
get
Expand Down Expand Up @@ -137,43 +162,26 @@ public static List<AppPages> GetMostRelevantPages(SynethiaConfig synethiaConfig)
{
Dictionary<AppPages, double> appScores = new()
{
{ AppPages.Status, synethiaConfig.StatusPageInfo.Score },
{ AppPages.DownDetector, synethiaConfig.DownDetectorPageInfo.Score },
{ AppPages.MyIP, synethiaConfig.MyIPPageInfo.Score },
{ AppPages.LocateIP, synethiaConfig.LocateIPPageInfo.Score },
{ AppPages.Ping, synethiaConfig.PingPageInfo.Score },
{ AppPages.IPConfig, synethiaConfig.IPConfigPageInfo.Score },
{ AppPages.WiFiPasswords, synethiaConfig.WiFiPasswordsPageInfo.Score },
{ AppPages.DnsTool, synethiaConfig.DnsPageInfo.Score },
{ AppPages.TraceRoute, synethiaConfig.TraceRoutePageInfo.Score },
{ AppPages.WiFiNetworks, synethiaConfig.WiFiNetworksPageInfo.Score },
{ AppPages.DownDetector, synethiaConfig.PagesInfo[0].Score },
{ AppPages.DnsTool, synethiaConfig.PagesInfo[1].Score },
{ AppPages.WiFiNetworks, synethiaConfig.PagesInfo[2].Score },
{ AppPages.LocateIP, synethiaConfig.PagesInfo[3].Score },
{ AppPages.IPConfig, synethiaConfig.PagesInfo[4].Score },
{ AppPages.Ping, synethiaConfig.PagesInfo[5].Score },
{ AppPages.TraceRoute, synethiaConfig.PagesInfo[6].Score },
{ AppPages.WiFiPasswords, synethiaConfig.PagesInfo[7].Score },
};

var sorted = appScores.OrderByDescending(x => x.Value);

return (from item in sorted select item.Key).ToList();
}

public static List<ActionInfo> GetMostRelevantActions(SynethiaConfig synethiaConfig)
{
Dictionary<ActionInfo, int> relevantActions = new();
for (int i = 0; i < synethiaConfig.ActionInfos.Count; i++)
{
relevantActions.Add(synethiaConfig.ActionInfos[i], synethiaConfig.ActionInfos[i].UsageCount);
}

// Sort each action with its usage count descending
var sorted = relevantActions.OrderByDescending(x => x.Value);
return (from item in sorted select item.Key).ToList();
}

public static List<AppPages> DefaultRelevantPages => new()
{
AppPages.Status,
AppPages.LocateIP,
AppPages.WiFiPasswords,
AppPages.DownDetector,
AppPages.MyIP,
AppPages.WiFiNetworks,
AppPages.Ping,
AppPages.TraceRoute,
Expand All @@ -183,16 +191,14 @@ public static List<ActionInfo> GetMostRelevantActions(SynethiaConfig synethiaCon

public static List<ActionInfo> DefaultRelevantActions => new()
{
new() { Action = AppActions.MyIP, UsageCount = 0 },
new() { Action = AppActions.Test, UsageCount = 0 },
new() { Action = AppActions.DownDetectorRequest, UsageCount = 0 },
new() { Action = AppActions.Ping, UsageCount = 0 },
new() { Action = AppActions.LocateIP, UsageCount = 0 },
new() { Action = AppActions.GetIPConfig, UsageCount = 0 },
new() { Action = AppActions.GetWiFiPasswords, UsageCount = 0 },
new() { Action = AppActions.ConnectWiFi, UsageCount = 0 },
new() { Action = AppActions.GetDnsInfo, UsageCount = 0 },
new() { Action = AppActions.TraceRoute, UsageCount = 0 },
new(4, "IPConfig.Get"),
new(2, "WiFiNetworks.Scan"),
new(3, "LocateIP.Locate"),
new(7, "WiFiPasswords.Get"),
new(0, "DownDetector.Test"),
new(5, "Ping.Execute"),
new(1, "DNS.GetInfo"),
new(6, "Traceroute.Execute"),
};

public static Dictionary<AppActions, string> ActionsIcons => new()
Expand Down
1 change: 1 addition & 0 deletions InternetTest/InternetTest/InternetTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<PackageReference Include="ManagedNativeWifi" Version="2.5.0" />
<PackageReference Include="PeyrSharp.Core" Version="2.1.0.2312" />
<PackageReference Include="PeyrSharp.Env" Version="2.1.0.2312" />
<PackageReference Include="Synethia" Version="1.1.1.2302" />
<PackageReference Include="Whois" Version="3.0.1" />
</ItemGroup>

Expand Down
88 changes: 40 additions & 48 deletions InternetTest/InternetTest/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,42 +82,42 @@ private void InitUI()
break;
case AppPages.DownDetector:
PageDisplayer.Content = Global.DownDetectorPage;
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[0].EnterUnixTime = Sys.UnixTime;
DownDetectorPageBtn.IsChecked = true;
break;
case AppPages.LocateIP:
PageDisplayer.Content = Global.LocateIpPage;
Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[3].EnterUnixTime = Sys.UnixTime;
LocateIPPageBtn.IsChecked = true;
break;
case AppPages.Ping:
PageDisplayer.Content = Global.PingPage;
Global.SynethiaConfig.PingPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[5].EnterUnixTime = Sys.UnixTime;
PingPageBtn.IsChecked = true;
break;
case AppPages.IPConfig:
PageDisplayer.Content = Global.IpConfigPage;
Global.SynethiaConfig.IPConfigPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[4].EnterUnixTime = Sys.UnixTime;
IPConfigPageBtn.IsChecked = true;
break;
case AppPages.WiFiPasswords:
PageDisplayer.Content = Global.WiFiPasswordsPage;
Global.SynethiaConfig.WiFiPasswordsPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[7].EnterUnixTime = Sys.UnixTime;
WifiPasswordsPageBtn.IsChecked = true;
break;
case AppPages.DnsTool:
PageDisplayer.Content = Global.DnsPage;
Global.SynethiaConfig.DnsPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[1].EnterUnixTime = Sys.UnixTime;
DnsPageBtn.IsChecked = true;
break;
case AppPages.TraceRoute:
PageDisplayer.Content = Global.TraceroutePage;
Global.SynethiaConfig.TraceRoutePageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[6].EnterUnixTime = Sys.UnixTime;
TraceroutePageBtn.IsChecked = true;
break;
case AppPages.WiFiNetworks:
PageDisplayer.Content = Global.WiFiNetworksPage;
Global.SynethiaConfig.WiFiNetworksPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[2].EnterUnixTime = Sys.UnixTime;
WiFiPageBtn.IsChecked = true;
break;
default:
Expand Down Expand Up @@ -156,42 +156,42 @@ private void PageCard_OnCardClick(object? sender, PageEventArgs e)
{
case AppPages.DownDetector:
PageDisplayer.Content = Global.DownDetectorPage;
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[0].EnterUnixTime = Sys.UnixTime;
DownDetectorPageBtn.IsChecked = true;
break;
case AppPages.LocateIP:
PageDisplayer.Content = Global.LocateIpPage;
Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[3].EnterUnixTime = Sys.UnixTime;
LocateIPPageBtn.IsChecked = true;
break;
case AppPages.Ping:
PageDisplayer.Content = Global.PingPage;
Global.SynethiaConfig.PingPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[5].EnterUnixTime = Sys.UnixTime;
PingPageBtn.IsChecked = true;
break;
case AppPages.IPConfig:
PageDisplayer.Content = Global.IpConfigPage;
Global.SynethiaConfig.IPConfigPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[4].EnterUnixTime = Sys.UnixTime;
IPConfigPageBtn.IsChecked = true;
break;
case AppPages.WiFiPasswords:
PageDisplayer.Content = Global.WiFiPasswordsPage;
Global.SynethiaConfig.WiFiPasswordsPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[7].EnterUnixTime = Sys.UnixTime;
WifiPasswordsPageBtn.IsChecked = true;
break;
case AppPages.DnsTool:
PageDisplayer.Content = Global.DnsPage;
Global.SynethiaConfig.DnsPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[1].EnterUnixTime = Sys.UnixTime;
DnsPageBtn.IsChecked = true;
break;
case AppPages.TraceRoute:
PageDisplayer.Content = Global.TraceroutePage;
Global.SynethiaConfig.TraceRoutePageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[6].EnterUnixTime = Sys.UnixTime;
TraceroutePageBtn.IsChecked = true;
break;
case AppPages.WiFiNetworks:
PageDisplayer.Content = Global.WiFiNetworksPage;
Global.SynethiaConfig.WiFiNetworksPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[2].EnterUnixTime = Sys.UnixTime;
WiFiPageBtn.IsChecked = true;
break;
default:
Expand Down Expand Up @@ -312,39 +312,39 @@ private void DownDetectorPageBtn_Click(object sender, RoutedEventArgs e)
LeavePage();

PageDisplayer.Content = Global.DownDetectorPage; // Display the down detector page
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[0].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void LocateIPPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.LocateIpPage; // Display the locate IP page
Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[3].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void PingPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.PingPage; // Display the ping page
Global.SynethiaConfig.PingPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[5].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void IPConfigPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.IpConfigPage; // Display the IP config page
Global.SynethiaConfig.IPConfigPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[4].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void WifiPasswordsPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.WiFiPasswordsPage; // Display the wifi passwords page
Global.SynethiaConfig.WiFiPasswordsPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[7].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void HomePageBtn_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -374,44 +374,36 @@ private void LeavePage()
switch (PageDisplayer.Content)
{
case DownDetectorPage:
Global.SynethiaConfig.DownDetectorPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.DownDetectorPageInfo.TotalTimeSpent += Global.SynethiaConfig.DownDetectorPageInfo.LeaveUnixTime - Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime;
Global.SynethiaConfig.DownDetectorPageInfo.Score = Global.SynethiaConfig.DownDetectorPageInfo.TotalTimeSpent * (Global.SynethiaConfig.DownDetectorPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.DownDetectorPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[0].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[0].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[0].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[0].EnterUnixTime;
break;
case LocateIpPage:
Global.SynethiaConfig.LocateIPPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.LocateIPPageInfo.TotalTimeSpent += Global.SynethiaConfig.LocateIPPageInfo.LeaveUnixTime - Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime;
Global.SynethiaConfig.LocateIPPageInfo.Score = Global.SynethiaConfig.LocateIPPageInfo.TotalTimeSpent * (Global.SynethiaConfig.LocateIPPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.LocateIPPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[3].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[3].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[3].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[3].EnterUnixTime;
break;
case PingPage:
Global.SynethiaConfig.PingPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PingPageInfo.TotalTimeSpent += Global.SynethiaConfig.PingPageInfo.LeaveUnixTime - Global.SynethiaConfig.PingPageInfo.EnterUnixTime;
Global.SynethiaConfig.PingPageInfo.Score = Global.SynethiaConfig.PingPageInfo.TotalTimeSpent * (Global.SynethiaConfig.PingPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.PingPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[5].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[5].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[5].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[5].EnterUnixTime;
break;
case IpConfigPage:
Global.SynethiaConfig.IPConfigPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.IPConfigPageInfo.TotalTimeSpent += Global.SynethiaConfig.IPConfigPageInfo.LeaveUnixTime - Global.SynethiaConfig.IPConfigPageInfo.EnterUnixTime;
Global.SynethiaConfig.IPConfigPageInfo.Score = Global.SynethiaConfig.IPConfigPageInfo.TotalTimeSpent * (Global.SynethiaConfig.IPConfigPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.IPConfigPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[4].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[4].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[4].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[4].EnterUnixTime;
break;
case WiFiPasswordsPage:
Global.SynethiaConfig.WiFiPasswordsPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.WiFiPasswordsPageInfo.TotalTimeSpent += Global.SynethiaConfig.WiFiPasswordsPageInfo.LeaveUnixTime - Global.SynethiaConfig.WiFiPasswordsPageInfo.EnterUnixTime;
Global.SynethiaConfig.WiFiPasswordsPageInfo.Score = Global.SynethiaConfig.WiFiPasswordsPageInfo.TotalTimeSpent * (Global.SynethiaConfig.WiFiPasswordsPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.WiFiPasswordsPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[7].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[7].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[7].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[7].EnterUnixTime;
break;
case DnsPage:
Global.SynethiaConfig.DnsPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.DnsPageInfo.TotalTimeSpent += Global.SynethiaConfig.DnsPageInfo.LeaveUnixTime - Global.SynethiaConfig.DnsPageInfo.EnterUnixTime;
Global.SynethiaConfig.DnsPageInfo.Score = Global.SynethiaConfig.DnsPageInfo.TotalTimeSpent * (Global.SynethiaConfig.DnsPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.DnsPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[1].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[1].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[1].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[1].EnterUnixTime;
break;
case TraceroutePage:
Global.SynethiaConfig.TraceRoutePageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.TraceRoutePageInfo.TotalTimeSpent += Global.SynethiaConfig.TraceRoutePageInfo.LeaveUnixTime - Global.SynethiaConfig.TraceRoutePageInfo.EnterUnixTime;
Global.SynethiaConfig.TraceRoutePageInfo.Score = Global.SynethiaConfig.TraceRoutePageInfo.TotalTimeSpent * (Global.SynethiaConfig.TraceRoutePageInfo.InteractionCount > 0 ? Global.SynethiaConfig.TraceRoutePageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[6].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[6].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[6].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[6].EnterUnixTime;
break;
case WiFiNetworksPage:
Global.SynethiaConfig.WiFiNetworksPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.WiFiNetworksPageInfo.TotalTimeSpent += Global.SynethiaConfig.WiFiNetworksPageInfo.LeaveUnixTime - Global.SynethiaConfig.WiFiNetworksPageInfo.EnterUnixTime;
Global.SynethiaConfig.WiFiNetworksPageInfo.Score = Global.SynethiaConfig.WiFiNetworksPageInfo.TotalTimeSpent * (Global.SynethiaConfig.WiFiNetworksPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.WiFiNetworksPageInfo.InteractionCount / 2d : 1d); // Calculate the score
Global.SynethiaConfig.PagesInfo[2].LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[2].TotalTimeSpent += Global.SynethiaConfig.PagesInfo[2].LeaveUnixTime - Global.SynethiaConfig.PagesInfo[2].EnterUnixTime;
break;
}
}
Expand Down Expand Up @@ -440,22 +432,22 @@ private void DnsPageBtn_Click(object sender, RoutedEventArgs e)
LeavePage();

PageDisplayer.Content = Global.DnsPage; // Display the IP config page
Global.SynethiaConfig.DnsPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[1].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void TraceroutePageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.TraceroutePage; // Display the ping page
Global.SynethiaConfig.TraceRoutePageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
Global.SynethiaConfig.PagesInfo[6].EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void WiFiPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();

PageDisplayer.Content = Global.WiFiNetworksPage;
Global.SynethiaConfig.WiFiNetworksPageInfo.EnterUnixTime = Sys.UnixTime;
Global.SynethiaConfig.PagesInfo[2].EnterUnixTime = Sys.UnixTime;
}
}
Loading

0 comments on commit 77da1f8

Please sign in to comment.