コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "")
     {
         //MyEventArgsLog arg = new MyEventArgsReg();
         MyEventArgs arg = new MyEventArgs();
         if (OkEvent != null)
         {
             arg.name = textBox1.Text;
             arg.password = textBox2.Text;
             OkEvent(this, arg);
         }
     }
     else
     {
         MessageBox.Show("Заполните все поля");
     }
 }
コード例 #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && comboBox1.Text != "" && textBox3.Text == textBox4.Text)
     {
         //MyEventArgsReg arg = new MyEventArgsReg();
         MyEventArgs arg = new MyEventArgs();
         if (OkEvent != null)
         {
             arg.name = textBox1.Text;
             arg.password = textBox4.Text;
             arg.quastion = comboBox1.Text;
             arg.answer = textBox1.Text;
             OkEvent(this, arg);
         }
     }
     else
     {
         if (textBox1.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && comboBox1.Text != "" && textBox3.Text != textBox4.Text)
             MessageBox.Show("Пароль не совпадает");
         else
             MessageBox.Show("Заполните все поля");
     }
 }