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 projectcsharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        DateTime d = new DateTime();

        private void مشتریToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_c f_c = new frm_c();
            f_c.ShowDialog();
        }


        private void کاربرانToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!Class1.limit == true)
            {
                frm_users f_users = new frm_users();
                f_users.ShowDialog();
            }
        }

        private void گزارشاتToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_report f_report = new frm_report();
            f_report.ShowDialog();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            if (Class1.limit == true)
            {

                کاربرانToolStripMenuItem.Enabled = false;

                گزارشاتToolStripMenuItem.Enabled = false;
            }
        }

        private void صدورفاکتورToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            frm_fac f_factor = new frm_fac();
            f_factor.ShowDialog();
        }



        private void نامغذاToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_f f_f = new frm_f();
            f_f.ShowDialog();
        }

        private void مواداولیهToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_f_com f_f_com = new frm_f_com();
            f_f_com.ShowDialog();
        }

        private void toolStripMenuItem30_Click(object sender, EventArgs e)
        {
            DialogResult ans = MessageBox.Show("آیا خارج می شوید؟", "پیغام", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (ans == DialogResult.Yes)
                this.Close();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            d = DateTime.Now;
            label1.Text = d.Hour.ToString() + ":" + d.Minute.ToString() + ":" + d.Second.ToString();
        }

    }
}
