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

namespace HT_SKT_Stock
{
    public partial class FrmInboundMenu : Form
    {
        public static FrmInboundMenu _Form_InboundMenuInstance;
        public String AppPath = "";


        public FrmInboundMenu()
        {
            InitializeComponent();
                       
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnBack.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnMenu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnInboundInspection.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnStoreInbound.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnReInbound.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

            btnProductionInbound.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmInboundMenu_KeyDown);

        }

        private void FrmInbound_Load(object sender, EventArgs e)
        {
            if (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width == 240)
            {
                resolution.ScreenSize.VGAtoQVGA(this);
            }

            this.MaximizeBox = !this.MaximizeBox;
            this.MinimizeBox = !this.MinimizeBox;

            _Form_InboundMenuInstance = this;


            String path = this.GetType().Assembly.GetModules()[0].FullyQualifiedName;
            Int32 en = path.LastIndexOf("\\");
            AppPath = path.Substring(0, en);

            lblUser.Text = "User : " + FrmLogin._Form_LoginInstance.userName;

        }

        private void btnBack_Click(object sender, EventArgs e)
        {
            FrmMainMenu._Form_MainMenuInstance.Show();
            //Bt.ScanLib.Control.btScanDisable();
            //this.Hide();
            this.Close();
        }

        private void btnMenu_Click(object sender, EventArgs e)
        {
            FrmMainMenu._Form_MainMenuInstance.Show();
            //Bt.ScanLib.Control.btScanDisable();
            //this.Hide();
            this.Close();
        }

        private void FrmInboundMenu_KeyDown(object sender, KeyEventArgs e)
        {

            switch (e.KeyCode.ToString())
            {

                case "F1":
                    btnBack_Click(sender, e);
                    break;

                case "F4":
                    btnMenu_Click(sender, e);
                    break;
            }
        }

        private void btnInboundInspection_KeyDown(object sender, KeyEventArgs e)
        {

           
        }

        private void btnBack_KeyDown(object sender, KeyEventArgs e)
        {
            
        }

        private void btnBack_LostFocus(object sender, EventArgs e)
        {
            
        }

        private void btnInboundInspection_Click(object sender, EventArgs e)
        {
            Form frmE = new FrmInboundInspection();
            frmE.Show();
            this.Hide();
        }

        private void btnStoreInbound_Click(object sender, EventArgs e)
        {
            Form frmE = new FrmStoreInbound();
            frmE.Show();
            this.Hide();
        }

        private void btnReInbound_Click(object sender, EventArgs e)
        {
            Form frmE = new FrmReInbound();
            frmE.Show();
            this.Hide();
        }

        private void btnProductionInbound_Click(object sender, EventArgs e)
        {
            Form frmE = new FrmProductionInbound();
            frmE.Show();
            this.Hide();
        }

       
    }
}