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 diplom
{
    public partial class login : Form
    {
        public login()
        {
            InitializeComponent();
        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void ok_button_Click(object sender, EventArgs e)
        {
            if (text_user.Text == "user" && text_pasw.Text == "user")
            {
                userForm user = new userForm();
                user.login = this;
                user.Show();
                this.Hide();
            }

            if (text_user.Text == "admin" && text_pasw.Text == "admin")
            {
                adminForm admin = new adminForm();
                admin.login = this;
                admin.Show();
                this.Hide();

                 
            }
               // this.DialogResult = DialogResult.OK;
           // else
                //this.DialogResult = DialogResult.Cancel;
            
        }

        private void cancel_button_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void login_Load(object sender, EventArgs e)
        {            
            
        }
    }
}
