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;
using System.Data.SqlClient;

namespace lavazem_behdashti
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            Form frm = new mahsolat();
            frm.ShowDialog();
        }

        private void buttonX2_Click(object sender, EventArgs e)
        {
            Form frm = new froosh();
            frm.ShowDialog();
        }

        private void buttonX3_Click(object sender, EventArgs e)
        {
            Form frm = new moshtari();
            frm.ShowDialog();
        }

        private void buttonX4_Click(object sender, EventArgs e)
        {
            Form frm = new chek();
            frm.ShowDialog();
        }

        private void buttonX5_Click(object sender, EventArgs e)
        {
            Form frm = new karbar();
            frm.ShowDialog();
        }

        private void buttonX6_Click(object sender, EventArgs e)
        {
            Form frm = new froosh_rpt();
            frm.ShowDialog();
        }

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

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                System.Globalization.PersianCalendar p = new System.Globalization.PersianCalendar();
                lbldate.Text = p.GetYear(DateTime.Now).ToString() + "/" + p.GetMonth(DateTime.Now).ToString("0#") + "/" + p.GetDayOfMonth(DateTime.Now).ToString("0#");
                // Language.ChangeCurrentLanguage("fa");
                //sideBarPanelItem2.Expanded = true;
                switch (DateTime.Now.DayOfWeek)
                {
                    case DayOfWeek.Friday:
                        lblday.Text = "جمعه";
                        break;
                    case DayOfWeek.Monday:
                        lblday.Text = "دوشنبه";
                        break;
                    case DayOfWeek.Saturday:
                        lblday.Text = "شنبه";
                        break;
                    case DayOfWeek.Sunday:
                        lblday.Text = "یکشنبه";
                        break;
                    case DayOfWeek.Thursday:
                        lblday.Text = "پنجشنبه";
                        break;
                    case DayOfWeek.Tuesday:
                        lblday.Text = "سه شنبه";
                        break;
                    case DayOfWeek.Wednesday:
                        lblday.Text = "چهارشنبه";
                        break;
                }
                //LoadSettings();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "خطا");
            }
        }

    }
}
