예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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));
            }
        }
예제 #5
0
 private void PreferencesItem_Click(object sender, RoutedEventArgs e)
 {
     SuperFrame.Navigate(new System.Uri("PreferencesPage.xaml", UriKind.RelativeOrAbsolute));
 }
예제 #6
0
 private void NewProfile_Click(object sender, RoutedEventArgs e)
 {
     MyGlobals.GlobalMethods.LogOut();
     SuperFrame.Navigate(new System.Uri("NewProfile.xaml", UriKind.RelativeOrAbsolute));
 }