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

namespace BimaryDetect
{
    public partial class frmMDI : Form
    {
        public frmMDI()
        {
            InitializeComponent();
        }

        private void darooRypeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDarooTypes frm = new frmDarooTypes();
            frm.MdiParent = this;
            frm.Show();
        }

        private void darooieJadidToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDarooha frm = new frmDarooha();
            frm.MdiParent = this;
            frm.Show();
        }

        private void aboutBarnamehToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("سیستم تشخیص بیماری - نسخه 1.1");
        }

        private void tavizeKalameieOboorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmChangPassword frm = new frmChangPassword();
            frm.MdiParent = this;
            frm.Show();
        }

        private void karbareJadidToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmKarbareJadid frm = new frmKarbareJadid();
            frm.MdiParent = this;
            frm.Show();
        }

        private void shamshiDatViewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FirstClass db = new FirstClass();
            MessageBox.Show(db.dtShamsi());
        }

        private void searchBimaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmJostoJoo frm = new frmJostoJoo();
            frm.MdiParent = this;
            frm.Show();
        }

        private void bimaryDarjToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmBimary frm = new frmBimary();
            frm.MdiParent = this;
            frm.Show();
        }

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

        private void frmMDI_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void frmMDI_Load(object sender, EventArgs e)
        {
            if (GlobalClass.GlobalVar != "admin")
            {
                karbareJadidToolStripMenuItem.Enabled = false;
            }
        }
    }
}
