Beispiel #1
0
        private void cmdJoinGame_Click(object sender, EventArgs e)
        {
            try
            {
                this.Hide();

                using (frmJoinGame f = new frmJoinGame())
                {
                    if (f.ShowDialog() == DialogResult.Cancel) return;

                    using (frmGame2 f2 = new frmGame2())
                    {
                        f2.ShowDialog(f._player, false);
                    }
                }

                //frmJoin f = new frmJoin();
                //if (f.ShowDialog() != DialogResult.OK)
                //{
                //    this.Show();
                //    return;
                //}

                //frmGame f2 = new frmGame();
                //f2.FormTerminated += new frmGame.FormTerminatedEventHandler(frmGame_FormTerminated);
                //f2.ShowDialog(false);
            }
            finally
            {
                this.Show();
            }
        }
Beispiel #2
0
        private void cmdCreateGame_Click(object sender, EventArgs e)
        {
            try
            {
                this.Hide();

                using (frmCreateGame f = new frmCreateGame())
                {
                    if (f.ShowDialog() == DialogResult.Cancel) return;

                    using (frmGame2 f2 = new frmGame2())
                    {
                        f2.ShowDialog(f._player, true);
                    }
                }

                //Remoting.GameSetting.ResetAll();

                //frmGame f = new frmGame();
                //f.FormTerminated += new frmGame.FormTerminatedEventHandler(frmGame_FormTerminated);
                //f.ShowDialog(true);

            }
            finally
            {
                this.Show();
            }
        }