示例#1
0
        private void btnControllerStatusRead_Click(object sender, RoutedEventArgs e)
        {
            t = Utils.Utils.GetTscDataByApplicationCurrentProperties();
            byte[] ba = TscDataUtils.GetControllerStatus(t.Node);
            byte[] bt = { ba[3], ba[4] };
            tbkTemperature.Text = Convert.ToString(System.BitConverter.ToInt16(bt, 0));
            byte bd = ba[5];

            tbkDoorStatus.Text = Utils.Utils.devMonitorDescDoor(bd);
            byte[] bv = { ba[6], ba[7] };
            tbkVoltage.Text = Convert.ToString(System.BitConverter.ToInt16(bv, 0));
            byte bpt = ba[8];

            tbkPowerType.Text = Utils.Utils.devMonitorDescPowerType(bpt);
        }