Exemplo n.º 1
0
        private void mouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                switch (((CustomButton)sender).Tag.ToString())
                {
                case "RankingTag":
                    if (ranking == null)
                    {
                        ranking     = new Ranking();
                        ranking.Tag = this;
                    }
                    ranking.Show(this);
                    this.Hide();
                    break;

                case "ExitTag":
                    Application.Exit();
                    break;

                case "NewGameTag":

                    Game newGame = new Game();
                    newGame.Tag = this;
                    newGame.Show(this);
                    this.Hide();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void mouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                switch(((CustomButton)sender).Tag.ToString()){
                    case "RankingTag":
                        if(ranking == null){
                            ranking = new Ranking();
                            ranking.Tag = this;
                        }
                        ranking.Show(this);
                        this.Hide();
                        break;

                    case "ExitTag":
                        Application.Exit();
                        break;

                    case "NewGameTag":

                        Game newGame = new Game();
                        newGame.Tag = this;
                        newGame.Show(this);
                        this.Hide();
                        break;
                }
            }
        }