예제 #1
0
        private void buttonEnterGame_Click(object sender, EventArgs e)
        {
            SqlDataAdapter sda = new SqlDataAdapter("Select Game_Pin,Mode From Pincode where Mode='GP' ", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (dt.Rows.Count == 0)
            {
                Dialogue.Show("No Host Server Detected for Groups! Please Wait for the Host to Start.", "", "Ok", "Cancel");
            }

            else
            {
                string code = dt.Rows[0][0].ToString();


                if (code == bunifuMetroTextbox1.Text)
                {
                    LobbyParticipant lobby = new LobbyParticipant();
                    lobby.ShowDialog();
                }

                else if (bunifuMetroTextbox1.Text == null || bunifuMetroTextbox1.Text == "")
                {
                    bunifuCustomLabel1.Text = "* Please Enter Code";
                }
                else
                {
                    bunifuCustomLabel1.Text = "* Code is Invalid!";
                }
            }//end else */
        }
예제 #2
0
        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            if (bunifuMetroTextbox1.Text == null || bunifuMetroTextbox1.Text == "")
            {
                Dialogue.Show("Please Provide a Screen Name", "", "Ok", "Cancel");
            }

            else
            {
                NameFREE = bunifuMetroTextbox1.Text;
                this.Hide();
                LobbyParticipant con = new LobbyParticipant();
                con.Show();
            }
        }