Beispiel #1
0
 private void Menu_Load(object sender, EventArgs e)
 {
     JoinRoom.Hide();
     CreateRoom.Hide();
     MyStatus.Hide();
     BestScores.Hide();
 }
Beispiel #2
0
        private void Sign_up_outB_Click(object sender, EventArgs e)
        {
            if (Sign_up_outB.Text == "Sign up")
            {
                this.Hide();
                Form SignUpForm = new SignUp(clientSocket, this);
                SignUpForm.Show();
            }
            else if (Sign_up_outB.Text == "Sign out")
            {
                string        signOutMsg   = "201";
                NetworkStream serverStream = clientSocket.GetStream();
                byte[]        outStream    = System.Text.Encoding.ASCII.GetBytes(signOutMsg);
                serverStream.Write(outStream, 0, outStream.Length);
                serverStream.Flush();

                Sign_up_outB.Text = "Sign up";
                UserNameLable.Show();
                PasswordLable.Show();
                userNameBox.Text = "";
                passwordBox.Text = "";
                userNameBox.Show();
                passwordBox.Show();
                SignIn.Show();
                GreetingsLable.Visible = false;
                JoinRoom.Hide();
                CreateRoom.Hide();
                MyStatus.Hide();
                BestScores.Hide();
            }
        }