xm
2020-05-13 99da2604f81af29afc6b3c6f4f128b4e5a8a5649
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -316,7 +316,7 @@
            functionSceneBodyView.Height = functionSceneAutoBodyView.Height - roomSwitchContr.Bottom;
            functionSceneAutoBodyView.AddChidren(functionSceneBodyView);
            //执行初始化
            //执行初始化
            roomSwitchContr.InitControl();
        }
@@ -759,16 +759,9 @@
                    {
                        //刷新卡片信息
                        var locadevice = LocalDevice.Current.GetDevice(mainKeys);
                        if (report.DeviceStatusReport.CluterID == 513 && report.DeviceStatusReport.AttriBute[0].AttributeId == 28)
                        {
                            //空调是特殊的,它的开关是属性上报来着.已经接收到网关的反馈
                            this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        }
                        if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
                        {
                            //新风是特殊的,它的开关是属性上报来着.已经接收到网关的反馈
                            this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        }
                        //已经接收到网关的反馈 2020.05.09:删除Ack主题
                        this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        //刷新控件
                        this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
                    }
                }, ShowErrorMode.NO);
@@ -786,23 +779,6 @@
                        bool bolOnline = LocalDevice.Current.CheckDeviceIsOnline(report);
                        this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(bolOnline);
                        return;
                    }
                }, ShowErrorMode.NO);
            });
            //设备控制反馈上报
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceRespone", ReceiveComandDiv.A节点控制反馈, (report) =>
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
                    string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
                    if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
                    {
                        //设备卡片
                        var deviceCardContr = this.dicDeviceRowControl[mainKeys];
                        //已经接收到网关的反馈
                        deviceCardContr.SetHadGetResponeResultStatu();
                    }
                }, ShowErrorMode.NO);
@@ -873,22 +849,10 @@
                    string path1 = string.Empty;
                    string path2 = string.Empty;
                    //获取图片
                    LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
                    LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo.ConcreteType, ref path1, ref path2);
                    dic[typeInfo.BeloneTextId].IconPath = path1;
                    dic[typeInfo.BeloneTextId].IconPathSelected = path2;
                    dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
                    if (device.Type == DeviceType.FreshAir)
                    {
                        dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
                        dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
                    }
                    if (device.Type == DeviceType.PMSensor)
                    {
                        // PM2.5
                        dic[typeInfo.BeloneTextId].IconPath = "Device/AirQualitySensorEpoint.png";
                        dic[typeInfo.BeloneTextId].IconPathSelected = "Device/AirQualitySensorEpointSelected.png";
                        dic[typeInfo.BeloneTextId].TextId = R.MyInternationalizationString.AirQualitySensor;
                    }
                    dic[typeInfo.BeloneTextId].IconPathSelected = path2;
                    dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
                }
                dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
            }