Ejemplo n.º 1
0
        public MainForm()
        {
            tempName = new InputName(this);
            InitializeComponent();

            client.DataReceived += Client_DataReceived;
            client.Start();
        }
Ejemplo n.º 2
0
        // Join active game
        private void button4_Click(object sender, EventArgs e)
        {
            this.button3.Visible = false;
            this.button4.Visible = false;

            InputName input = new InputName(this);
            if (input.ShowDialog() == DialogResult.OK)
            {
                Player one = new Player(input.InputResult, 1);
                MainForm.gameTable1.add_Player(one);

                this.labelJoiningGame.Visible = true;
                NetworkObjects.JoinGame joinGameMsg = new NetworkObjects.JoinGame();
                joinGameMsg.Name = input.InputResult;
                client.Send(joinGameMsg);
            }

            /*
            this.button5.Visible = true;
            this.button6.Visible = true;
            this.button7.Visible = true;
            this.button8.Visible = true;
            this.button9.Visible = true;

            this.richTextBox1.Visible = true;
            this.richTextBox2.Visible = true;
            */
        }