예제 #1
0
 public void OneClickTest()
 {
     Thread.Sleep(BandTime * 1000);
     AgentDll.btn_Continue();
     Thread.Sleep(CommonTime * 1000 * 2);
     AgentDll.btn_Password();
     Thread.Sleep(PatientTime * 1000);
     AgentDll.btn_Demographics();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.btn_LoadPatientData();
     Thread.Sleep(CommonTime * 2000);
     AgentDll.choose_one_patient();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.btn_Previous_Patient();
     Thread.Sleep(CommonTime * 1000);
     //AgentDll.btn_Previous_Patient();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.btn_PatForm1_Close();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.btn_Calibration();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.manul_Calib_device();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.start_test();
     Thread.Sleep(PrepareTime * 1000);
     AgentDll.do_test();
     Thread.Sleep(CommonTime * 1000);
     AgentDll.export_report();
     Thread.Sleep(5 * 1000);
 }
예제 #2
0
        private void ExportXML()
        {
            string dbpath = "C:\\Clasp32\\DATA\\data.db3";

            try
            {
                if (File.Exists(infoFile))
                {
                    File.Delete(infoFile);
                }
                if (File.Exists(matrixFile))
                {
                    File.Delete(matrixFile);
                }
                Thread.Sleep(200);
                AgentDll.dump_table(dbpath, "Info", infoFile);
                Thread.Sleep(200);
                AgentDll.dump_table(dbpath, "Conscida", matrixFile);
                Thread.Sleep(200);
                AgentDll.dump_table(dbpath, "Risks", risksFile);
            }
            catch (Exception ex)
            {
                WriteLog(ex.ToString());
                string str = ex.ToString();
            }
        }
예제 #3
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         AgentDll.exit_target();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Agent关闭进程失败" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         WriteLog("Agent关闭进程失败" + ex.ToString());
     }
 }
예제 #4
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         AgentDll.launchEx(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Agent启动失败" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         WriteLog("Agent启动失败" + ex.ToString());
     }
 }
예제 #5
0
        private void button13_Click(object sender, EventArgs e)
        {
            bool isCon = AgentDll.check_dev_con();

            if (isCon)
            {
                MessageBox.Show("设备已经连接");
            }
            else
            {
                MessageBox.Show("设备没有连接");
            }
        }
예제 #6
0
        public bool TestHead()
        {
            bool          rtn = false;
            StringBuilder buf = new StringBuilder(1024);

            AgentDll.btn_check_head_band(buf);
            string txt = buf.ToString();

            if (txt == "HEAD_OK")
            {
                rtn = true;
            }
            return(rtn);
        }
예제 #7
0
        public bool TestRF()
        {
            bool          rtn = false;
            StringBuilder buf = new StringBuilder(1024);

            AgentDll.btn_check_rfoot_band(buf);
            string txt = buf.ToString();

            if (txt == "RFOOT_OK")
            {
                rtn = true;
            }
            return(rtn);
        }
예제 #8
0
        private void button15_Click(object sender, EventArgs e)
        {
            bool          rtn = false;
            StringBuilder buf = new StringBuilder(1024);

            AgentDll.btn_check_head_band(buf);
            string txt = buf.ToString();

            if (txt == "HEAD_OK")
            {
                rtn = true;
            }
            if (rtn)
            {
                MessageBox.Show("头部绑带正常");
            }
            else
            {
                MessageBox.Show("头部绑带不正常");
            }
        }
예제 #9
0
        private void button1_Click(object sender, EventArgs e)
        {
            string name     = "test1113";
            string birthday = "2018-07-21";
            string location = "wh";
            string sex      = "Male";
            string sql      = string.Format("INSERT INTO patient VALUES (NULL, '{0}', '{1}', '{2}', '中国', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '{3}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 10, 0, 0, 76, 88, 85, 91, 98, 64, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 1, 1, 1, 1, 1, 2, NULL, NULL, NULL);", name, birthday, location, sex);
            string clearSql = "Delete from patient";
            string dbpath   = "C:\\Clasp32\\DATA\\data.db3";

            try
            {
                AgentDll.exec_sql(dbpath, clearSql);
                AgentDll.exec_sql(dbpath, sql);
                MessageBox.Show("数据插入成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("dbAgent数据插入失败" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                WriteLog("dbAgent数据插入失败" + ex.ToString());
            }
        }
예제 #10
0
 public void ExecSql(string dbpath, string sql)
 {
     AgentDll.exec_sql(dbpath, sql);
 }
예제 #11
0
 private void button14_Click(object sender, EventArgs e)
 {
     AgentDll.btn_tformcomport_close();
 }
예제 #12
0
 public void Nutrition()
 {
     Thread.Sleep(CommonTime * 1000);
     AgentDll.nutr_load();
 }
예제 #13
0
 public void Risk()
 {
     Thread.Sleep(CommonTime * 1000);
     AgentDll.risk_load_data();
 }
예제 #14
0
 private void button5_Click(object sender, EventArgs e)
 {
     AgentDll.btn_Continue();
 }
예제 #15
0
 public void Emotion()
 {
     Thread.Sleep(CommonTime * 1000);
     AgentDll.make_emotion_chart();
 }
예제 #16
0
 public void TestLaunch(bool bShow)
 {
     AgentDll.launchEx(bShow);
     Thread.Sleep(StartUp * 1000);
 }
예제 #17
0
 public void ExportReport()
 {
     Thread.Sleep(CommonTime * 1000);
     AgentDll.export_report();
 }
예제 #18
0
 public void CloseBandTest()
 {
     AgentDll.btn_tformcomport_close();
 }
예제 #19
0
 public void TestStart()
 {
     AgentDll.start_test();
     Thread.Sleep(PrepareTime * 1000);
     AgentDll.do_test();
 }