Ejemplo n.º 1
0
        private void mouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                switch (((Kontrolka)sender).Tag.ToString())
                {

                    case "NastepnaRundaTag":
                        GraGraczForm graGracz = new GraGraczForm(runda, profile, new Gra(), nastepnyGracz);
                        graGracz.Tag = this;
                        graGracz.Show(this);
                        this.Hide();
                        break;

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

                    case "MenuTag":
                        Menu menu = new Menu();
                        menu.Tag = this;
                        menu.Show(this);
                        this.Hide();
                        break;

                }
            }
        }
Ejemplo n.º 2
0
        private void mouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                switch (((Kontrolka)sender).Tag.ToString())
                {
                    case "ConfirmTag":
                        String user1Name = user1Box.Text;
                        String user2Name = user2Box.Text;
                        pro.setGracz1(user1Name);
                        pro.setGracz2(user2Name);
                        GraGraczForm graForm = new GraGraczForm(new Rundy(), pro, gra, false);
                        graForm.Tag = this;
                        graForm.Show(this);
                        this.Hide();
                        break;

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

                    case "MenuTag":
                        Menu menu = new Menu();
                        menu.Tag = this;
                        menu.Show(this);
                        this.Hide();
                        break;

                }
            }
        }