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 VideoCloop
{
    public partial class frmMain : Form
    {
        frmRepLogsShow frm1;
        frmCustomer frm2;
            frmMovie frm3;
            frmTahvil frm4;
            frmTypeFilm frm5;
            frmTypeProduct frm6;
            frmUser frm7;
            frmRptDaramad frm8;
            frmrptDaryaftFilm frm9;
            frmRptTedadFilmMoshtari frm10;
            frmRptListFilm frm11;

        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            Class_Register_Logs LogsRegIn = new Class_Register_Logs(this.Text + " is Opened.");
            Class_Day_Lists Cls_Day_Lists = new Class_Day_Lists();
            Statuse_Main.Text = Cls_Day_Lists.CRCompleteShamsiDate;
            
        }

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

        private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
        {
            Class_Register_Logs LogsRegIn = new Class_Register_Logs(this.Text + " is Closed.");
            Application.Exit();
        }

        private void Timer_Main1001_Tick(object sender, EventArgs e)
        {
            Class_Day_Lists Cls_Day_Lists = new Class_Day_Lists();
            Statuse_Main.Text = Cls_Day_Lists.CRCompleteShamsiDate;
        }

        private void Mnu_Reports_Logs_Click(object sender, EventArgs e)
        {
            if (frm1 == null || frm1.IsDisposed)
            {
                frm1 = new frmRepLogsShow();
                frm1.MdiParent = this;
                frm1.Show();
            }
            else
            {
                frm1.Activate();
            }
        }

        private void تعریفمToolStripMenuItem_Click(object sender, EventArgs e)
        {
           
            if (frm2 == null || frm2.IsDisposed)
            {
                frm2 = new frmCustomer();
                frm2.MdiParent = this;
                frm2.Show();
            }
            else
            {
                frm2.Activate();
            }
        }

        private void تعریففیلمToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm3 == null || frm3.IsDisposed)
            {
                frm3 = new frmMovie();
                frm3.MdiParent = this;
                frm3.Show();
            }
            else
            {
                frm3.Activate();
            }
        }

        private void تحویلفیلمToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm4 == null || frm4.IsDisposed)
            {
                frm4 = new frmTahvil();
                frm4.MdiParent = this;
                frm4.Show();
            }
            else
            {
                frm4.Activate();
            }
        }

        private void تعریفنوعفیلمToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm5 == null || frm5.IsDisposed)
            {
                frm5 = new frmTypeFilm();
                frm5.MdiParent = this;
                frm5.Show();
            }
            else
            {
                frm5.Activate();
            }
        }

        private void تعریفنوعمحصولToolStripMenuItem_Click(object sender, EventArgs e)
        {
           
            if (frm6 == null || frm6.IsDisposed)
            {
                frm6 = new frmTypeProduct();
                frm6.MdiParent = this;
                frm6.Show();
            }
            else
            {
                frm2.Activate();
            }
        }

        private void تعریفکاربرToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new frmUser().ShowDialog();
            if (frm7 == null || frm7.IsDisposed)
            {
                frm7 = new frmUser();
                frm7.MdiParent = this;
                frm7.Show();
            }
            else
            {
                frm7.Activate();
            }
        }

        private void میزاندرآمددریکبازهزمانیToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm8 == null || frm8.IsDisposed)
            {
                frm8 = new frmRptDaramad();
                frm8.MdiParent = this;
                frm8.Show();
            }
            else
            {
                frm8.Activate();
            }
        }

        private void میزاندرآمدهرفیلمToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm9 == null || frm9.IsDisposed)
            {
                frm9 = new frmrptDaryaftFilm();
                frm9.MdiParent = this;
                frm9.Show();
            }
            else
            {
                frm9.Activate();
            }
        }

        private void تعدادفیلمدریافتیهرمشتریToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm10 == null || frm10.IsDisposed)
            {
                frm10 = new frmRptTedadFilmMoshtari();
                frm10.MdiParent = this;
                frm10.Show();
            }
            else
            {
                frm10.Activate();
            }
        }

        private void نموداردریافتهرگروهفیلمToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            if (frm11 == null || frm11.IsDisposed)
            {
                frm11 = new frmRptListFilm ();
                frm11.MdiParent = this;
                frm11.Show();
            }
            else
            {
                frm11.Activate();
            }
        }
    }
}