Skip to content

Commit

Permalink
Added the possibility to navigate to the DownDetector page (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Mar 21, 2021
1 parent 11b19c7 commit 67e772b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions InternetTest/InternetTest/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ protected override void OnStartup(StartupEventArgs e)
{
Global.ConnectionPage = new(); // Create a new ConnectionPage
Global.LocalizeIPPage = new(); // Create a new LocalizeIPPage
Global.DownDetectorPage = new(); // Create a new DownDetectorPage

base.OnStartup(e);
}
Expand Down
5 changes: 5 additions & 0 deletions InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public static class Global
/// </summary>
public static LocalizeIPPage LocalizeIPPage { get; set; }

/// <summary>
/// The <see cref="Pages.DownDetectorPage"/>.
/// </summary>
public static DownDetectorPage DownDetectorPage { get; set; }

/// <summary>
/// The current version of InternetTest.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions InternetTest/InternetTest/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ private void DownDetectorBtn_Click(object sender, RoutedEventArgs e)
{
ResetAllCheckStatus(); // Reset the background and foreground of all buttons
CheckButton(DownDetectorBtn); // Check the "Settings" button

PageContent.Navigate(Global.DownDetectorPage); // Navigate
}
}
}

0 comments on commit 67e772b

Please sign in to comment.