예제 #1
0
        private void cToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IntializeServer();

            hg       = new HostGameWindow();
            hg.Owner = this;
            if (hg.ShowDialog() == DialogResult.OK)
            {
                mg          = new ChessboardWindow();
                mg.Owner    = this;
                mg.Location = new Point(30, 100);
                mg.Show();
            }
        }
예제 #2
0
        private void joinAServerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConnectionWindow f = new ConnectionWindow();

            if (f.ShowDialog() == DialogResult.OK)
            {
                port = int.Parse(f.Port.Text);
                ConnectToServer(f.TextBox1.Text);
                mg          = new ChessboardWindow();
                mg.Owner    = this;
                mg.Location = new Point(30, 100);
                mg.Show();
            }
        }