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;
using System.Threading;
using System.IO;
using SCAN.Data.DataModel;
using SCAN.Data.DataAccess;
using TowerLightSignal;
namespace SCAN
{
    public partial class Form_Settings : Form
    {
        TowerlightSignal objTowerlight = new TowerlightSignal();
        public static Form_Settings _FormInstanceDatasync;

        private string AppPath;

        public Form_Settings()
        {
            InitializeComponent();
        }

        private void Form_Settings_Load_1(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;
            //String path = this.GetType().Assembly.GetModules()[0].FullyQualifiedName;
            //Int32 en = path.LastIndexOf("\\");
            //AppPath = path.Substring(0, en);

            _FormInstanceDatasync = this;

           //textBoxAddress.Text= objTowerlight.Load();
        }

    
        private void btnMainMenu_Click(object sender, EventArgs e)
        {
            //importCSV2Db(Form_Login._Form_LoginInstance.CSV_IMPORT_DIRTank_and_material);

            Form_Menu._Form_MenuInstance.Show();
            this.Close();
        }

        private void Form_Datasync_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode.ToString())
            {


                case "F4":
                    btnMainMenu_Click(sender, e);

                    break;

            }
        }

        private void buttonOpen_Click(object sender, EventArgs e)
        {
            objTowerlight.OpenBluetooth();
        }

        private void buttonClose_Click(object sender, EventArgs e)
        {
            objTowerlight.CloseBluetooth();
        }

        private void buttonConnect_Click(object sender, EventArgs e)
        {
            objTowerlight.ConnectBluetooth();
        }

 

  

    }
}