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 Amozeshgah
{
    public partial class MainForm : DevComponents.DotNetBar.Office2007RibbonForm 
        
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            timer1.Enabled = true;
            System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
            DateTime dt = new DateTime();
            dt = DateTime.Now;
            Class_date cdate = new Class_date();
            string date = dt.Year.ToString() + "/" + dt.Month.ToString() + "/" + dt.Day.ToString();

            LblDate.Text = cdate.Shamsi(date);
            Login frm = new Login();
            frm.ShowDialog();
            
        }

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

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

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

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

        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = true;
            System.Globalization.PersianCalendar pcc = new System.Globalization.PersianCalendar();
            DateTime tm = new DateTime();
            tm = DateTime.Now;
            lblTime.Text = pcc.GetHour(tm).ToString() + ":" + pcc.GetMinute(tm).ToString() + ":" + pcc.GetSecond(tm).ToString();
        }

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

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

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

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

        private void buttonItem4_Click(object sender, EventArgs e)
        {
            Student_Report sr = new Student_Report();
            sr.MdiParent = this;
            sr.Show();


        }

        private void buttonItem7_Click(object sender, EventArgs e)
        {
            Student_Report sr = new Student_Report();
            sr.MdiParent = this;
            sr.Show();
        }

        private void ribbonControl1_Click(object sender, EventArgs e)
        {
            Login frm = new Login();
            frm.MdiParent = this;
            frm.ShowDialog();
        }

        private void buttonItem9_Click(object sender, EventArgs e)
        {
            Teaher_Report tr = new Teaher_Report();
            tr.MdiParent = this;
            tr.Show();
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }

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

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

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

        private void ribbonPanel6_Click(object sender, EventArgs e)
        {

        }

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

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

        private void buttonItem41_Click(object sender, EventArgs e)
        {
            Form1 f = new Form1();
            f.Show();
        }

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

        private void buttonItem2_Click(object sender, EventArgs e)
        {
            abouts ab = new abouts();
            ab.Show();
        }

        private void ribbonBar3_ItemClick(object sender, EventArgs e)
        {

        }

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

          }
}
