123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace AMONIC_Airlines02
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- {
- var Login1 = "j.doe@amonic.com";
- var Pass1 = "123";
- var Login2 = "k.omar@amonic.com";
- var Pass2 = "4258";
- var Login3 = "h.saeed@amonic.com";
- var Pass3 = "2020";
- var Login4 = "a.hobart@amonic.com";
- var Pass4 = "6996";
- var Login5 = "k.anderson@amonic.com";
- var Pass5 = "4570";
- var Login6 = "h.wyrick@amonic.com";
- var Pass6 = "1199";
- var Login7 = "marie.horn@amonic.com";
- var Pass7 = "55555";
- var Login8 = "m.osteen@amonic.com";
- var Pass8 = "9800";
- if ((t_login.Text == Login1) && (t_Parol.Text == Pass1))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login2) && (t_Parol.Text == Pass2))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login3) && (t_Parol.Text == Pass3))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login4) && (t_Parol.Text == Pass4))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login5) && (t_Parol.Text == Pass5))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login6) && (t_Parol.Text == Pass6))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login7) && (t_Parol.Text == Pass7))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text == Login8) && (t_Parol.Text == Pass8))
- {
- Form2 form2 = new Form2();
- form2.Show();
- this.Hide();
- }
- if ((t_login.Text != Login3) && (t_Parol.Text != Pass3) &&
- (t_login.Text != Login1) && (t_Parol.Text != Pass1) &&
- (t_login.Text != Login2) && (t_Parol.Text != Pass2) &&
- (t_login.Text != Login4) && (t_Parol.Text != Pass4) &&
- (t_login.Text != Login5) && (t_Parol.Text != Pass5) &&
- (t_login.Text != Login6) && (t_Parol.Text != Pass6) &&
- (t_login.Text != Login7) && (t_Parol.Text != Pass7) &&
- (t_login.Text != Login8) && (t_Parol.Text != Pass8))
- {
- MessageBox.Show("Неверный логин или пароль");
- }
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- MessageBoxButtons msb = MessageBoxButtons.YesNo;
- String message = "Вы действительно хотите выйти?";
- String caption = "Выход";
- if (MessageBox.Show(message, caption, msb) == DialogResult.Yes)
- this.Close();
- }
- }
- }
|