using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Grocery
{
    public partial class FrmReport : Form
    {
        int c = 4;
        public FrmReport()
        {
            InitializeComponent();
        }

        private void FrmReport_Load(object sender, EventArgs e)
        {
            this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width;
            label1.Text = c.ToString();
            timer1.Enabled = true;
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            c--;
            label1.Text = c.ToString();
            if (c == -1) this.Close();
        }

        private void label1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            label1.Text = "";
        }

        private void checkBoxX1_CheckedChanged(object sender, EventArgs e)
        {
            timer1.Enabled = checkBoxX1.Checked;
        }
    }
}
