| | |
| | | }
|
| | |
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.X = ControlCommonResourse.XXLeft;
|
| | | frameBack.X = HdlControlResourse.XXLeft;
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameBack.Width = bodyFrameLayout.Width;
|
| | | frameBack.Height = Application.GetRealHeight(1650);
|
| | |
| | | this.AddDeviceRow(dicGroupDevice[strText], strText, listView);
|
| | | foreach (var deviceKey in dicGroupDevice[strText].listDeviceKeys)
|
| | | {
|
| | | var device = Common.LocalDevice.Current.GetDevice(deviceKey);
|
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKey);
|
| | | //以回路作为索引去指定对象
|
| | | dicData[deviceKey] = dicGroupDevice[strText];
|
| | | }
|
| | |
| | | private void AddDeviceRow(DeviceRowInfo rowInfo, string strText, VerticalListControl listView)
|
| | | {
|
| | | var frameRow = new FrameRowControl(listView.rowSpace / 2);
|
| | | frameRow.LeftOffset = Application.GetRealWidth(46) - ControlCommonResourse.XXLeft;
|
| | | frameRow.RightOffset = -ControlCommonResourse.XXLeft;
|
| | | frameRow.LeftOffset = Application.GetRealWidth(46) - HdlControlResourse.XXLeft;
|
| | | frameRow.RightOffset = -HdlControlResourse.XXLeft;
|
| | | listView.AddChidren(frameRow);
|
| | | //图标
|
| | | var btnIcon = frameRow.AddLeftIcon(81);
|
| | |
| | | var dic = new Dictionary<string, DeviceRowInfo>();
|
| | | foreach (var device in listDevice)
|
| | | {
|
| | | var typeInfo = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device);
|
| | | var typeInfo = HdlDeviceCommonLogic.Current.GetDeviceBelongEnumInfo(device);
|
| | | //按所属ID分组
|
| | | if (dic.ContainsKey(typeInfo.BeloneText) == false)
|
| | | {
|
| | |
| | | string path1 = string.Empty;
|
| | | string path2 = string.Empty;
|
| | | //获取图片
|
| | | Common.LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo, ref path1, ref path2);
|
| | | HdlDeviceCommonLogic.Current.GetDeviceFunctionTypeMenuIcon(typeInfo, ref path1, ref path2);
|
| | | dic[typeInfo.BeloneText].IconPath = path1;
|
| | | }
|
| | | dic[typeInfo.BeloneText].listDeviceKeys.Add(Common.LocalDevice.Current.GetDeviceMainKeys(device));
|
| | | dic[typeInfo.BeloneText].listDeviceKeys.Add(HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device));
|
| | | }
|
| | | return dic;
|
| | | }
|
| | |
| | | if (dicCheck.ContainsKey(localDevice.DeviceAddr) == false)
|
| | | {
|
| | | //只需要检测一路
|
| | | var deviceInfo = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(localDevice);
|
| | | var deviceInfo = HdlDeviceCommonLogic.Current.ReadDeviceEpointDeviceInfo(localDevice);
|
| | | if (deviceInfo != null)
|
| | | {
|
| | | localDevice.IsOnline = deviceInfo.IsOnline;
|
| | | dicCheck[localDevice.DeviceAddr] = Common.LocalDevice.Current.CheckDeviceIsOnline(localDevice, false);
|
| | | dicCheck[localDevice.DeviceAddr] = HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(localDevice, false);
|
| | | }
|
| | | }
|
| | | if (dicCheck.ContainsKey(localDevice.DeviceAddr) == false
|
| | |
| | | //网关没有回复,或者不在线
|
| | | continue;
|
| | | }
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(localDevice);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(localDevice);
|
| | | if (dicData.ContainsKey(mainkeys) == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|