using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Publishmentation
{
    public partial class NewAdmin : Form
    {
        public NewAdmin()
        {
            InitializeComponent();
        }
        Form1 form = new Form1();
        private void button1_Click(object sender, EventArgs e)
        {
            LoginClass login = new LoginClass();
            if (!login.loginVerification(textBox1.Text,textBox2.Text))
                MessageBox.Show("نام کاربری و رمز عبور مطابقت ندارد ", "اخطار", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            else
            {
                this.Hide();
                form.Enabled = true;
                form.Focus();
            }

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

        } 

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void LoginForm_FormClosed(object sender, FormClosedEventArgs e)
        {
        }

        private void LoginForm_Load(object sender, EventArgs e)
        {
            form.Show();
            form.Enabled = false;
        }
    }
}