HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-12-14 e90209beae6a4e822cecb18e6889f8bda23f630e
ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs
@@ -87,8 +87,19 @@
            btnMore.InitControl();
            btnMore.ButtonClickEvent += (sender, e) =>
            {
                var detailInfo = new DeviceDetailInfoForm();
                detailInfo.AddForm(device, nowSelectRoom);
                //获取设备属于【晾衣架】
                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice> { device });
                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.Airer)
                {
                    var form = new Shared.Phone.UserCenter.Device.DeviceFunctionSettionForm();
                    form.AddForm(device, true);
                }
                else
                {
                    var detailInfo = new DeviceDetailInfoForm();
                    detailInfo.AddForm(device, nowSelectRoom);
                }
            };
            //初始化中部信息
@@ -126,7 +137,7 @@
            btnDeviceName.Y = Application.GetRealHeight(46);
            btnDeviceName.TextSize = 15;
            btnDeviceName.IsBold = true;
            btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device);
            btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
            btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
            btnDeviceName.TextAlignment = TextAlignment.Center;
            btnDeviceName.Gravity = Gravity.CenterHorizontal;
@@ -146,7 +157,7 @@
            frameRoomBlack.Height = Application.GetRealHeight(138);
            frameRoomBlack.Width = frameWhiteBack.Width;
            frameRoomBlack.BackgroundColor = 0xff232323;
            frameRoomBlack.Radius= (uint)Application.GetRealHeight(17);
            frameRoomBlack.Radius = (uint)Application.GetRealHeight(17);
            frameRoomBlack.Gravity = Gravity.BottomCenter;
            frameWhiteBack.AddChidren(frameRoomBlack);
@@ -159,7 +170,7 @@
            //房间图标
            var btnRoomIcon = new IconViewControl(81);
            btnRoomIcon.X = HdlControlResourse.XXLeft;
            btnRoomIcon.X = ControlCommonResourse.XXLeft;
            btnRoomIcon.UnSelectedImagePath = "Item/Room.png";
            btnRoomIcon.Gravity = Gravity.CenterVertical;
            frameRoomBlack.AddChidren(btnRoomIcon);
@@ -295,21 +306,36 @@
        /// </summary>
        private void AddDeviceReportEvent()
        {
            string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
            string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
            //属性上报
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A设备属性上报, (report) =>
            {
                string mainKey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report);
                if (mainKeys != mainKey2)
                string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report);
                if (this.device.Type == DeviceType.Airer && this.device.DeviceAddr == report.DeviceAddr)
                {
                    //不是同一个东西
                    return;
                    //晾衣架特殊:5个回路代表不同的功能,但是默认本地只显示了第一个回路
                    //所以条件特殊判断
                    //检测结果
                    if (this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, report) == true)
                    {
                        //结果已经接收到
                        this.ResponeResult = 1;
                    }
                }
                //检测结果
                if (this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, report) == true)
                else
                {
                    //结果已经接收到
                    this.ResponeResult = 1;
                    if (mainKeys != mainKey2)
                    {
                        //不是同一个东西
                        return;
                    }
                    //检测结果
                    if (this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, report) == true)
                    {
                        //结果已经接收到
                        this.ResponeResult = 1;
                    }
                }
            });
        }
@@ -337,7 +363,7 @@
            else
            {
                //刷新名字
                this.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device);
                this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(this.device);
                btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
                btnDeviceName.Gravity = Gravity.CenterHorizontal;
                if (this.nowSelectRoom == null)
@@ -363,7 +389,7 @@
        /// </summary>
        public override void CloseFormBefore()
        {
            string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device);
            string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
            HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceDetailCardAttribute" + mainKeys);
            //回调函数