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 WarningErr2YesNo : Form
    {
        public WarningErr2YesNo(string strWarning1, string strWarning2)
        {
            InitializeComponent();

            lblWarning1.Text = strWarning1;

            lblWarning2.Text = strWarning2;

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

            btnNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WarningErr2YesNo_KeyDown);

            btnYes.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WarningErr2YesNo_KeyDown);
        }

       
        private void btnYes_Click(object sender, EventArgs e)
        {
            FrmInspectionDetail.blYes = true;
            this.Close();
        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            FrmInspectionDetail.blYes = false;
            this.Close();
        }

        private void WarningErr2YesNo_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;

            btnYes.Focus();

        }

        private void WarningErr2YesNo_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode.ToString())
            {
                                   
                case "F4":
                    btnNo_Click(sender, e);
                    break;
            }
        }
    }
}