示例#1
0
        private void bt_sent_Click(object sender, EventArgs e)
        {
            msgCenter.Objects.TestResultObject.TestResult result = new msgCenter.Objects.TestResultObject.TestResult();
            result.maxValue = 110;
            result.minValue = 85;
            result.stateFlag = msgCenter.Objects.TestResultObject.STATE_FLAG_CRITICAL;
            result.testTime = DateTime.Now;
            result.testType = "Blood Presure";

            //mp.newTest(result);

            //mp.newDialog("test msg", "001");
            //int x= msgCenter.Objects.UserObject.test(DateTime.Now.ToString());
            //mp.ContactUpdatingEvent += updateContacts;
            //mp.getContacts();

            //mp.MSGUpdatingEvent += updateMSG;
               // mp.StartSync();
            //MessageBox.Show(x.ToString());

            //mp.newDialog(mp.Chat("hello"));
            mp.CallPhone();
        }
示例#2
0
 private void bt_ok_Click(object sender, EventArgs e)
 {
     msgCenter.Objects.TestResultObject test=new msgCenter.Objects.TestResultObject();
     msgCenter.Objects.TestResultObject.TestResult newTest = new msgCenter.Objects.TestResultObject.TestResult();
     newTest.testType = testType.ToString();
     newTest.testTime = DateTime.Now;
     newTest.stateFlag = msgCenter.Objects.TestResultObject.STATE_FLAG_GOOD;
     if (testType.Equals(msgCenter.Objects.TestResultObject.TESTTYPE_Glucose)) {
         newTest.maxValue = float.Parse(tb_glucose.Text);
     }
     else if  (testType.Equals(msgCenter.Objects.TestResultObject.TESTTYPE_Insulin))  {
         newTest.maxValue = float.Parse(tb_insulin.Text);
     }
     else if (testType.Equals(msgCenter.Objects.TestResultObject.TESTTYPE_Calories)) {
         newTest.maxValue = float.Parse(tb_calory.Text);
     }
     else if (testType.Equals(msgCenter.Objects.TestResultObject.TESTTYPE_Exercise)) {
         //newTest.maxValue = float.Parse(tb);
     }
     test.Result = newTest;
     test.SaveResult();
     MessageBox.Show("Value Saved.");
 }