Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String username = "******";
            String password = "******";
            String username1 = "Mehmet Ozcan";
            String username2 = "Mike Meridith";
            String username3 = "Vacher Pascal";
            GUI ss = new GUI();

            if ((textBox1.Text == username) && (textBox2.Text == password))
            {
                this.Hide();
                ss.ShowDialog();
               // ss.Passvalue2 = textBox1.Text;

            }
            else
                if ((textBox1.Text == username1) && (textBox2.Text == password))
                {
                    this.Hide();
                    ss.ShowDialog();
                    ss.textBox127.Text = textBox1.Text;
                   // ss.Passvalue2 = textBox1.Text;

                }
                else
                    if ((textBox1.Text == username2) && (textBox2.Text == password))
                    {
                        this.Hide();
                        ss.ShowDialog();
                        ss.textBox127.Text = textBox1.Text;
                      //  ss.Passvalue2 = textBox1.Text;

                    }
                    else
                        if ((textBox1.Text == username3) && (textBox2.Text == password))
                        {
                            this.Hide();
                            ss.ShowDialog();
                            ss.textBox127.Text = textBox1.Text;
                        //    ss.Passvalue2 = textBox1.Text;

                        }
                        else
                        {
                            MessageBox.Show("Please Check Username and Password");
                             ss.Close();
                             textBox1.ResetText();
                             textBox2.ResetText();
                        }

            ss.Passvalue2 = textBox1.Text;
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     GUI g1 = new GUI();
     string namestr = textBox1.Text;
     g1.comboBox1.Items.Add(namestr);
     g1.comboBox2.Items.Add(namestr);
     g1.comboBox3.Items.Add(namestr);
     g1.comboBox4.Items.Add(namestr);
     this.Close();
     g1.ShowDialog();
 }
Exemplo n.º 3
0
 private void button3_Click(object sender, EventArgs e)
 {
     GUI g1 = new GUI();
     g1.Hide();
     g1.ShowDialog();
 }