Example #1
0
        public void SetRecord()
        {
            int tmp = 0;

            if (KindGame == 1)
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();

                if (Score > high_score.player_easy.GetMinScore())
                {
                    if (Score > high_score.player_easy.GetMaxScore())
                    {
                        tmp = 1;
                    }
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            else if (KindGame == 2)
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();
                if (Score > high_score.player_mid.GetMinScore())
                {
                    if (Score > high_score.player_mid.GetMaxScore())
                    {
                        tmp = 1;
                    }
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            else
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();
                if (Score > high_score.player_hard.GetMinScore())
                {
                    if (Score > high_score.player_hard.GetMaxScore())
                    {
                        tmp = 1;
                    }
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            Config config     = OptionPlay.ReadConfig();
            int    tmp_config = config.MaxLevel;

            if (Level - 1 > tmp_config)
            {
                config = new Config(effect, wayeffect.BackColor, English, KindGame, Level - 1);
                OptionPlay.WriteConfig(config);
            }
            PScreen.HideScreen();
            HighScore high = new HighScore(KindGame - 1);

            high.ShowDialog();
            high.Dispose();
        }
Example #2
0
        public void SetRecord()
        {
            int tmp = 0;
            if (KindGame==1)
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();

                if (Score > high_score.player_easy.GetMinScore())
                {
                    if (Score > high_score.player_easy.GetMaxScore())
                        tmp = 1;
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            else if (KindGame==2)
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();
                if (Score > high_score.player_mid.GetMinScore())
                {
                    if (Score > high_score.player_mid.GetMaxScore())
                        tmp = 1;
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            else
            {
                UIT_PokemonHighScore.List_highscore high_score = UIT_PokemonHighScore.HighScoreGame.ReadHighScore();
                if (Score> high_score.player_hard.GetMinScore())
                {
                    if (Score > high_score.player_hard.GetMaxScore())
                        tmp = 1;
                    InputName IN = new InputName(this, tmp);
                    IN.ShowDialog();
                    IN.Dispose();
                }
            }
            Config config = OptionPlay.ReadConfig();
            int tmp_config = config.MaxLevel;
            if (Level - 1 > tmp_config)
            {
                config = new Config(effect, wayeffect.BackColor, English, KindGame, Level - 1);
                OptionPlay.WriteConfig(config);
            }
            PScreen.HideScreen();
            HighScore high = new HighScore(KindGame-1);
            high.ShowDialog();
            high.Dispose();
        }