private void ManageProfile_Click(object sender, RoutedEventArgs e) { if (MyGlobals.CurrentProfile != null) { MyGlobals.TemporaryItem = MyGlobals.CurrentProfile; } SuperFrame.Navigate(new System.Uri("NewProfile.xaml", UriKind.RelativeOrAbsolute)); }
public void SuperFrameSpareTest() { SuperFrame frame = new SuperFrame(10, "7,3,10,#"); Assert.IsTrue(frame.Valid); Assert.IsTrue(frame.FrameNumber == 10); Assert.IsTrue(frame.RollOne.Points < 10); // a spare Assert.IsTrue(frame.RollOne.Points + frame.RollTwo.Points == 10); // a spare Assert.IsTrue(frame.RollExtraOne.Points == 10); Assert.IsTrue((frame.RollExtraTwo?.Points ?? -1) == -1); }
public void SuperFrameStrikeTest() { SuperFrame frame = new SuperFrame(10, "10X,#,10,10"); Assert.IsTrue(frame.Valid); Assert.IsTrue(frame.FrameNumber == 10); Assert.IsTrue(frame.RollOne.Points == 10); Assert.IsTrue((frame.RollTwo?.Points ?? -1) == -1); Assert.IsTrue(frame.RollExtraOne.Points == 10); Assert.IsTrue(frame.RollExtraTwo.Points == 10); }
private void DeleteProfileMenu_Click(object sender, RoutedEventArgs e) { if (MyGlobals.CurrentProfile != null) { App.PassDB.RemoveProfile(MyGlobals.CurrentProfile.Username); App.PassDB.RemoveAllItens(MyGlobals.CurrentProfile.Username); MyGlobals.CurrentProfile = null; MyGlobals.TemporaryItem = Items.Empty(); SuperFrame.Navigate(new System.Uri("LoginPage.xaml", UriKind.RelativeOrAbsolute)); } }
private void PreferencesItem_Click(object sender, RoutedEventArgs e) { SuperFrame.Navigate(new System.Uri("PreferencesPage.xaml", UriKind.RelativeOrAbsolute)); }
private void NewProfile_Click(object sender, RoutedEventArgs e) { MyGlobals.GlobalMethods.LogOut(); SuperFrame.Navigate(new System.Uri("NewProfile.xaml", UriKind.RelativeOrAbsolute)); }