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 ErrorForm : Form
    {
        public ErrorForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //this.Hide();
            //if (Form_Loading_FG._FormInstance != null)
            //{
            //    Form_Loading_FG._FormInstance.Dispose();
            //}
            //if (Loading_PDS._FormInstance != null)
            //{
            //    Loading_PDS._FormInstance.Dispose();
            //}
            ////if (Form_DS._FormInstance != null)
            ////{
            ////    Form_DS._FormInstance.Dispose();
            ////}
            
            ////if (Form_Login._Form_LoginInstance != null)
            ////{
            // //   Form_Login._Form_LoginInstance.Dispose();
            ////}
            ////Form_Login login = new Form_Login();

            //// Keep Login form insance
            ////call refresh function of login form
            ////FrmLogin._Form_LoginInstance.SetUserInfo();
            //FrmLogin._Form_LoginInstance.Show();
            this.Close();
            
        }

        private void Form_Menu_Closed(object sender, EventArgs e)
        {
           /* if (Form_Loading_FG._FormInstance != null)
            {
                Form_Loading_FG._FormInstance.Dispose();
            }
            if (Loading_PDS._FormInstance != null)
            {
                Loading_PDS._FormInstance.Dispose();
            }
            if (Form_DS._FormInstance != null)
            {
                Form_DS._FormInstance.Dispose();
            }
            if (Form_Login._Form_LoginInstance != null)
            {
                Form_Login._Form_LoginInstance.Dispose();
            }
            Form_Login login = new Form_Login();
            login.Show(); 
            * */
        }

        private void ErrorForm_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;
        }
    }
}