Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.t.Abort();
            Client.client_socket.ReceiveTimeout = this.originalTimeout;
            byte[]            response = new byte[200];
            GameStartResponse res      = new GameStartResponse();

            byte[] request = serializer.buildMessage(17);
            Client.client_socket.Send(request);

            lock (Client.locker)
            {
                res = serializer.DeAssembleMessage <GameStartResponse>(response);
            }

            if (res.status == 1)
            {
                if (game_form == null)
                {
                    game_form = new game();

                    game_form.Parent = this;
                }

                game_form.Show();

                this.Hide();
            }
        }
Exemplo n.º 2
0
        private void loadMember()
        {
            if (game_form == null)
            {
                game_form = new game();

                game_form.Parent = this;
            }

            game_form.Show();

            this.Hide();
        }