Пример #1
0
        /// <summary>
        /// 更新设备树
        /// </summary>
        private void UpdateDeviceTreeImpl()
        {
            ClearAllNodes();

            tnRoot.Tag = "0";
            tvwDevice.Nodes.Add(tnRoot);
            lstNodes.Add(tnRoot);

            foreach (DeviceInfo di in GloablInfo.devMgr.lstDevs)
            {
                if (SmartDeviceInterface.SmartDevice_IsOnline(di.deviceID) ==
                    SmartDeviceInterface.OPERATOR_ONLINE)
                {
                    AddDeviceNode(di, 1);
                }
                else
                {
                    AddDeviceNode(di, 2);
                }
            }
            tnRoot.ExpandAll();
        }
Пример #2
0
 /// <summary>
 ///判断智能设备是否在线
 /// </summary>
 /// <param name="deviceID">4位厂商编号+4位主设备编号+12位MAC地址数(或者唯一编号)共20位</param>
 /// <returns>返回操作结果码OPERATOR_</returns>
 public Int32 SmartDevice_IsOnline(string deviceID)
 {
     return(SmartDeviceInterface.SmartDevice_IsOnline(deviceID));
 }