陈嘉乐
2020-05-18 5da99fed2eb0d08b6338064da5f998891252c7b8
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -248,7 +248,8 @@
                //自动化
                else if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 2)
                {
                    this.ShowAutotion();
                    //自动化功能代码入口
                    Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
                    //隐藏楼层
                    floorVisible = false;
                    //显示右上角的加号
@@ -438,8 +439,8 @@
            var noFunction = new Button()
            {
                Y = Application.GetRealHeight(320),
                Width = Application.GetMinRealAverage(757),
                Height = Application.GetMinRealAverage(435),
                Width = this.GetPictrueRealSize(757),
                Height = this.GetPictrueRealSize(435),
                UnSelectedImagePath = "Item/NoFunction.png",
                Gravity = Gravity.CenterHorizontal
            };
@@ -506,51 +507,56 @@
                    //窗帘
                    if (device.Type == DeviceType.WindowCoveringDevice)
                    {
                        cardContr = new Controls.DeviceCurtainRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceCurtainRowControl();
                    }
                    //继电器
                    else if (device.Type == DeviceType.OnOffOutput)
                    {
                        cardContr = new Controls.DeviceRelayRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceRelayRowControl();
                    }
                    //空气开关
                    else if (device.Type == DeviceType.AirSwitch)
                    {
                        cardContr = new Controls.DeviceAirSwitchRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceAirSwitchRowControl();
                    }
                    //空调
                    else if (device.Type == DeviceType.Thermostat)
                    {
                        cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceAcRowControl();
                    }
                    // 新风
                    else if (device.Type == DeviceType.FreshAir)
                    {
                        cardContr = new Controls.DeviceFreshAirRowControl();
                    }
                    //彩灯(调光器)
                    else if (device.Type == DeviceType.DimmableLight)
                    {
                        cardContr = new Controls.DeviceColorLightRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceColorLightRowControl();
                    }
                    //传感器
                    else if (device.Type == DeviceType.IASZone)
                    {
                        cardContr = new Controls.DeviceSensorRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceSensorRowControl();
                    }
                    //温湿度
                    else if (device.Type == DeviceType.TemperatureSensor)
                    {
                        cardContr = new Controls.DeviceTemperatureRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceTemperatureRowControl();
                    }
                    //门锁
                    else if (device.Type == DeviceType.DoorLock)
                    {
                        cardContr = new Controls.DeviceDoorLockRowControl(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceDoorLockRowControl();
                    }
                    //无法识别
                    else
                    {
                        cardContr = new Controls.DeviceRowCommon(listView.rowSpace / 2);
                        cardContr = new Controls.DeviceRowCommon();
                        //没有状态功能
                        cardContr.hadStatuFunction = false;
                    }
                    cardContr.chidrenYaxis = listView.rowSpace / 2;
                    //初始化卡片
                    listView.AddChidren(cardContr);
                    cardContr.InitControl(device);
@@ -761,8 +767,8 @@
            var noFunction = new Button()
            {
                Y = Application.GetRealHeight(320),
                Width = Application.GetMinRealAverage(757),
                Height = Application.GetMinRealAverage(435),
                Width = this.GetPictrueRealSize(757),
                Height = this.GetPictrueRealSize(435),
                UnSelectedImagePath = "Item/NoFunction.png",
                Gravity = Gravity.CenterHorizontal
            };
@@ -808,6 +814,11 @@
                            //空调是特殊的,它的开关是属性上报来着.已经接收到网关的反馈
                            this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        }
                        if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
                        {
                            //新风是特殊的,它的开关是属性上报来着.已经接收到网关的反馈
                            this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        }
                        this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
                    }
                }, ShowErrorMode.NO);
@@ -822,7 +833,8 @@
                    if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
                    {
                        //刷新卡片状态
                        this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(report.IsOnline == 1);
                        bool bolOnline = LocalDevice.Current.CheckDeviceIsOnline(report);
                        this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(bolOnline);
                        return;
                    }
@@ -914,6 +926,11 @@
                    LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
                    dic[typeInfo.BeloneTextId].IconPath = path1;
                    dic[typeInfo.BeloneTextId].IconPathSelected = path2;
                    if (device.Type == DeviceType.FreshAir)
                    {
                        dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
                        dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
                    }
                    dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
                }
                dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
@@ -994,18 +1011,6 @@
            /// 设备回路主键
            /// </summary>
            public List<string> listDeviceKeys = new List<string>();
        }
        #endregion
        #region ◆ 自动化__________________________
        /// <summary>
        /// 自动化功能代码入口
        /// </summary>
        private void ShowAutotion()
        {
            Shared.Phone.Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
        }
        #endregion