Exemple #1
0
        private void Deside_Click(object sender, RoutedEventArgs e)
        {
            if (FallGameMode.Text.Equals("通常モード"))
            {
                int min = int.Parse(MinSet.Text);
                int sec = int.Parse(SecSet.Text);
                time = (min * 60) + sec;

                if (BallSize.Text == "普通")
                {
                    ballsize = 100;
                }
                else if (BallSize.Text == "大きい")
                {
                    ballsize = 125;
                }
                else if (BallSize.Text == "小さい")
                {
                    ballsize = 70;
                }
                else
                {
                    ballsize = 100;
                }

                if (BallSpeed.Text == "普通")
                {
                    ballspeed = 2;
                }
                else if (BallSpeed.Text == "速い")
                {
                    ballspeed = 3;
                }
                else if (BallSpeed.Text == "遅い")
                {
                    ballspeed = 1;
                }
                else
                {
                    ballspeed = 2;
                }

                Application.Current.Properties["ballsize"]  = ballsize;
                Application.Current.Properties["ballspeed"] = ballspeed;
                Application.Current.Properties["timeset"]   = time;

                var nextPage = new FallGame();
                NavigationService.Navigate(nextPage);
            }
            else if (FallGameMode.Text.Equals("練習モード"))
            {
                if (BallSize.Text == "普通")
                {
                    ballsize = 100;
                }
                else if (BallSize.Text == "大きい")
                {
                    ballsize = 125;
                }
                else if (BallSize.Text == "小さい")
                {
                    ballsize = 70;
                }


                if (BallSpeed.Text == "普通")
                {
                    ballspeed = 2;
                }
                else if (BallSpeed.Text == "速い")
                {
                    ballspeed = 3;
                }
                else if (BallSpeed.Text == "遅い")
                {
                    ballspeed = 1;
                }
                else
                {
                    ballspeed = 2;
                }

                Application.Current.Properties["ballsize"]  = ballsize;
                Application.Current.Properties["ballspeed"] = ballspeed;
                Application.Current.Properties["timeset"]   = 0;

                var nextPage = new FallGame_Prac();
                NavigationService.Navigate(nextPage);
            }
        }
Exemple #2
0
        private void Precmode_Click(object sender, EventArgs e)
        {
            var nextPage = new FallGame_Prac();

            NavigationService.Navigate(nextPage);
        }