示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length < 5)
            {
                MessageBox.Show("PLEASE ENTER A USERNAME OF LENGTH 5");
            }
            else if (!textBox2.Text.Contains("@gmail.com"))
            {
                MessageBox.Show("PLEASE ENTER A VALID EMAIL ADDRESS");
            }
            else
            {
                server.Service1 myserver = new server.Service1();
                myserver.registration(textBox1.Text, textBox2.Text);

                MessageBox.Show("REGISTERED!");
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length < 5)
            {
                MessageBox.Show("Please Enter a Username of Length 5 characters");
            }
            else if (!textBox2.Text.Contains("@gmail.com"))
            {
                MessageBox.Show("Enter a valid email");
            }
            else
            {
                server.Service1 myserver = new server.Service1();
                myserver.registration(textBox1.Text, textBox2.Text);

                MessageBox.Show("user registered");
            }
        }