예제 #1
0
        public static void Main()
        {
            TempSen.device ITAG = new TempSen.device(10); // or 11
            if (ITAG.connectDevice() == true)             // search for an usable device and  connect to it .
            {
                string[] AlarmSet = ITAG.getAlarmSet();
                string[] Config   = ITAG.getConfig();
                /// 1 – request temperature list(temperature in Celsius). 2 – request temperature(temperature in Celsius), date and time list.
                string[] Record1   = ITAG.getRecord(1);
                string[] Record2   = ITAG.getRecord(2);
                string[] Analysis  = ITAG.getAnalysis();
                string[] OtherInfo = ITAG.getOtherInfo();
            }

            ITAG.disconnectDevice();
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     label1.Text = "";
     if (button1.Text == "connectDevice")
     {
         if (ITAG.connectDevice() == true)
         {
             groupBox2.Enabled = true;
             label1.ForeColor  = Color.Blue;
             label1.Text       = "Found ITAG-SingleUse Temperature Label!";
             button1.Text      = "disconnectDevice";
         }
         else
         {
             groupBox2.Enabled = false;
             label1.ForeColor  = Color.Red;
             label1.Text       = "Please connect to ITAG-SingleUse Temperature Label!";
         }
     }
     else
     {
         ITAG.disconnectDevice(); button1.Text = "connectDevice";
     }
 }