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

namespace WindowsFormsApplication1
{
    public partial class FormUser : Form
    {
        public FormUser()
        {
            InitializeComponent();
        }

        private void FormUser_Load(object sender, EventArgs e)
        {

            txtusername.Text = "";
            txtpassword.Text = "";


       }

        private void btnok_Click(object sender, EventArgs e)
        {
            if (txtusername.Text == "admin" && txtpassword.Text == "123")
            {
                this.Visible = false;
                Form1 f1=new Form1();
                f1.ShowDialog();
            }  
            else
            {
                MessageBox.Show("نام کاربری یا رمز عبور اشتباه است", "");
            }
        }

        private void btnexit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}
