using System;
using System.Windows.Forms;
using TinyHeels.App_Code;

namespace TinyHeels
{
    public partial class SelectDate : Form
    {
        public SelectDate()
        {
            InitializeComponent();
            checkBox1.Visible = false;
            txtDate.Value = DateTime.Parse(DateTime.Now.ToShortDateString());
        }
        public SelectDate(int x)
        {
            InitializeComponent();
            checkBox1.Visible = true;
            txtDate.Value = DateTime.Parse(DateTime.Now.ToShortDateString());
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Common.command = true;
            if (checkBox1.Checked)
                Common.fromBeginning = true;
            else
                Common.fromBeginning = false;
            Common.firstDate = txtDate.Value;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Common.command = false;
            this.Close();
        }
    }
}
