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

namespace Publishmentation
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
        private void تغییرکلمهعبورToolStripMenuItem_Click(object sender, EventArgs e)
        {
            changePassword changer = new changePassword();
            focusOff(changer);
            
        }

        private void خروجToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void تعریفمدیرجدیدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewManger manager = new NewManger();
            focusOff(manager);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void درموردبرنامهToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox about = new AboutBox();
            focusOff(about);
        }

        private void سفارشجدیدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            book_registeration register=new book_registeration();
            focusOff(register); 
        }

        private void تعریفمشتریجدیدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewCustomer newCustomer = new NewCustomer();
            focusOff(newCustomer);
        }
        void focusOff(Form frm)
        {
            this.Enabled = false;
            frm.Show();
            frm.Focus();
        }

        private void سفارشکتابToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void پیگیریسفارشاتToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Request request = new Request();
            focusOff(request);
        }

        private void گزارشگیریToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportForm reportForm = new ReportForm();
            focusOff(reportForm);
        }
    }
}