﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Windows.Forms;

using Shop.SubWindows;

namespace Shop
{
    public partial class Form1 : Form
    {
        DebugConsole DBC = new DebugConsole();

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            DBC.Show();
            DBC.Write("Starting Form_load");

            Awake();
            Main();
            Start();
            this.Focus();

            DBC.Write("Done loading Form_load");
        }

        public void Awake() 
        {
            DBC.Write("Starting Awake");
            DBC.Write("Done loading Awake");
        }

        public void Main() 
        {
            DBC.Write("Starting Main");
            DBC.Write("Done loading Main");
        }

        public void Start() 
        {
            DBC.Write("Starting Start");
            DBC.Write("Done loading Start");
        }

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {

            DBC.Write(e.KeyChar.ToString() + "was prest");

            if (e.KeyChar == Convert.ToChar(Keys.Escape))
            {
                
                MenuESC a = new MenuESC(this);

                a.Show();

            }
        }

    }
}
