Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            translatorApi = new TranslatorApi();
        }
Ejemplo n.º 2
0
        public Form1()
        {
            //初期化
            InitializeComponent();
            eyeCloseCount = 0;
            dgree = 0;
            BlinkCount = 0;
            distance = 0;

            firstBlink = 20;
 
            eyeClose = false;

            //初期設定
            firstDistance =600 ;
            firstDgree= 0;
            firstBlink = 21;

            listBox3.Items.Clear();
            listBox3.Items.Add("瞬き  " + firstBlink  + " 回/分");
            listBox3.Items.Add("首の傾き " + firstDgree + " 度");
            listBox3.Items.Add("画面距離 " + firstDistance + " mm");

            
            _eyeXHost = new FormsEyeXHost();

            //フルスクリーンにする
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
            
            
            translatorApi = new TranslatorApi();


            string ExcelBookFileName = "test2";

            ExcelApp
              = new Microsoft.Office.Interop.Excel.Application();
            ExcelApp.Visible = false;
            wb = ExcelApp.Workbooks.Add();

            ws1 = wb.Sheets[1];
            ws1.Select(Type.Missing);

            Range rgn = ws1.Cells[excelCount, 1];
            rgn.Value2 = "瞬目率";
            rgn = ws1.Cells[excelCount, 2];
            rgn.Value2 = "首の傾き";
            rgn = ws1.Cells[excelCount, 3];
            rgn.Value2 = "画面距離";
            rgn = ws1.Cells[excelCount, 4];
            rgn.Value2 = "視線先の単語";
            rgn = ws1.Cells[excelCount, 5];
            rgn.Value2 = "瞬き判定";
            rgn = ws1.Cells[excelCount, 6];
            rgn.Value2 = "タイムコード";
            rgn = ws1.Cells[excelCount, 7];
            rgn.Value2 = "視線位置X座標";
            rgn = ws1.Cells[excelCount, 8];
            rgn.Value2 = "視線位置Y座標";
            rgn = ws1.Cells[excelCount, 9];
            rgn.Value2 = "主観的難易度推定";
            rgn = ws1.Cells[excelCount, 10];
            rgn.Value2 = "瞬目からの推定";
            rgn = ws1.Cells[excelCount, 11];
            rgn.Value2 = "首の傾き分散からの推定";
            rgn = ws1.Cells[excelCount, 12];
            rgn.Value2 = "画面距離分散からの推定";
            rgn = ws1.Cells[excelCount, 13];
            rgn.Value2 = "首の傾きの分散";
            rgn = ws1.Cells[excelCount, 14];
            rgn.Value2 = "画面距離の分散";

         


            this.listBox2.Visible = false;
            this.listBox3.Visible = false;
            this.label3.Visible = false;
            this.label1.Visible = false;
            this.listBox1.Visible = false;                

            


            //Form_Load呼び出し
            Load += Form1_Load;


        }