Skip to content

Commit

Permalink
Removed My IP page (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Dec 25, 2023
1 parent f7a842e commit 4ae5f8e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 725 deletions.
1 change: 0 additions & 1 deletion InternetTest/InternetTest/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ private void Application_Startup(object sender, StartupEventArgs e)
Global.HistoryPage = new();
Global.SettingsPage = new();
Global.DownDetectorPage = new();
Global.MyIpPage = new();
Global.LocateIpPage = new();
Global.PingPage = new();
Global.IpConfigPage = new();
Expand Down
1 change: 0 additions & 1 deletion InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public static class Global
public static HistoryPage? HistoryPage { get; set; }
public static SettingsPage? SettingsPage { get; set; }
public static DownDetectorPage? DownDetectorPage { get; set; }
public static MyIpPage? MyIpPage { get; set; }
public static LocateIpPage? LocateIpPage { get; set; }
public static PingPage? PingPage { get; set; }
public static IpConfigPage? IpConfigPage { get; set; }
Expand Down
14 changes: 0 additions & 14 deletions InternetTest/InternetTest/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -638,20 +638,6 @@
</Button.Triggers>
</Button>
<StackPanel x:Name="IPPanel" Visibility="Collapsed">
<RadioButton
x:Name="MyIPPageBtn"
Margin="10 0 0 0"
Padding="5 2 2 2"
HorizontalContentAlignment="Left"
Background="Transparent"
BorderThickness="0"
Click="MyIPPageBtn_Click"
Content="{x:Static lang:Resources.MyIP}"
FontSize="10"
FontWeight="ExtraBold"
Foreground="{Binding Source={StaticResource AccentColor}}"
GroupName="NavBar"
Style="{DynamicResource NavBarToolButton}" />
<RadioButton
x:Name="LocateIPPageBtn"
Margin="10 0 0 0"
Expand Down
24 changes: 0 additions & 24 deletions InternetTest/InternetTest/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ private void InitUI()
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime;
DownDetectorPageBtn.IsChecked = true;
break;
case AppPages.MyIP:
PageDisplayer.Content = Global.MyIpPage;
Global.SynethiaConfig.MyIPPageInfo.EnterUnixTime = Sys.UnixTime;
MyIPPageBtn.IsChecked = true;
break;
case AppPages.LocateIP:
PageDisplayer.Content = Global.LocateIpPage;
Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime = Sys.UnixTime;
Expand Down Expand Up @@ -164,11 +159,6 @@ private void PageCard_OnCardClick(object? sender, PageEventArgs e)
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime;
DownDetectorPageBtn.IsChecked = true;
break;
case AppPages.MyIP:
PageDisplayer.Content = Global.MyIpPage;
Global.SynethiaConfig.MyIPPageInfo.EnterUnixTime = Sys.UnixTime;
MyIPPageBtn.IsChecked = true;
break;
case AppPages.LocateIP:
PageDisplayer.Content = Global.LocateIpPage;
Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime = Sys.UnixTime;
Expand Down Expand Up @@ -325,14 +315,6 @@ private void DownDetectorPageBtn_Click(object sender, RoutedEventArgs e)
Global.SynethiaConfig.DownDetectorPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

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

PageDisplayer.Content = Global.MyIpPage; // Display the my IP page
Global.SynethiaConfig.MyIPPageInfo.EnterUnixTime = Sys.UnixTime; // Update the last entered time
}

private void LocateIPPageBtn_Click(object sender, RoutedEventArgs e)
{
LeavePage();
Expand Down Expand Up @@ -396,11 +378,6 @@ private void LeavePage()
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
break;
case MyIpPage:
Global.SynethiaConfig.MyIPPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.MyIPPageInfo.TotalTimeSpent += Global.SynethiaConfig.MyIPPageInfo.LeaveUnixTime - Global.SynethiaConfig.MyIPPageInfo.EnterUnixTime;
Global.SynethiaConfig.MyIPPageInfo.Score = Global.SynethiaConfig.MyIPPageInfo.TotalTimeSpent * (Global.SynethiaConfig.MyIPPageInfo.InteractionCount > 0 ? Global.SynethiaConfig.MyIPPageInfo.InteractionCount / 2d : 1d); // Calculate the score
break;
case LocateIpPage:
Global.SynethiaConfig.LocateIPPageInfo.LeaveUnixTime = Sys.UnixTime;
Global.SynethiaConfig.LocateIPPageInfo.TotalTimeSpent += Global.SynethiaConfig.LocateIPPageInfo.LeaveUnixTime - Global.SynethiaConfig.LocateIPPageInfo.EnterUnixTime;
Expand Down Expand Up @@ -446,7 +423,6 @@ private void ConfidentialModeBtn_Click(object sender, RoutedEventArgs e)
RegularLockTxt.Visibility = Global.IsConfidentialModeEnabled ? Visibility.Collapsed : Visibility.Visible;
FilledLockTxt.Visibility = !Global.IsConfidentialModeEnabled ? Visibility.Collapsed : Visibility.Visible;

Global.MyIpPage?.ToggleConfidentialMode(Global.IsConfidentialModeEnabled);
Global.LocateIpPage?.ToggleConfidentialMode(Global.IsConfidentialModeEnabled);
Global.IpConfigPage?.ToggleConfidentialMode(Global.IsConfidentialModeEnabled);
Global.WiFiPasswordsPage?.ToggleConfidentialMode();
Expand Down
Loading

0 comments on commit 4ae5f8e

Please sign in to comment.