黄学彪
2020-06-10 dce6c3481a37216292724013ff9d2b75ceb82f86
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -54,6 +54,7 @@
        /// </summary>
        public CategoryMainForm()
        {
            this.FormID = "CategoryMainForm";
            BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
            instance = this;
        }
@@ -161,7 +162,7 @@
                    floors.changeFloor = true;
                    floors.FloorAction += (floorId) =>
                    {
                        btnFloorName.Text = Config.Instance.Home.GetFloorNameById(floorId);
                        btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
                        HdlRoomLogic.Current.NowCategoryRoom = HdlRoomLogic.Current.GetLoveRoom();
                        //刷新bodyView
                        this.RefreshBodyView();
@@ -532,6 +533,11 @@
                    {
                        cardContr = new Controls.DeviceDoorLockRowControl();
                    }
                    //色温灯
                    else if (device.Type == DeviceType.ColorTemperatureLight)
                    {
                        cardContr = new Controls.DeviceColorTemperatureRowControl();
                    }
                    //无法识别
                    else
                    {
@@ -797,7 +803,7 @@
        private void AddNormalDeviceReportEvent()
        {
            //设备属性上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceStatus", ReceiveComandDiv.A设备属性上报, (report) =>
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormDeviceStatus", ReceiveComandDiv.A设备属性上报, (report) =>
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
@@ -816,7 +822,7 @@
            });
            //设备在线上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceOnline", ReceiveComandDiv.A设备在线上报, (report) =>
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormDeviceOnline", ReceiveComandDiv.A设备在线上报, (report) =>
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
@@ -843,7 +849,7 @@
        private void AddSensorDeviceReportEvent()
        {
            //传感器上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewSensor", ReceiveComandDiv.A传感器上报, (report) =>
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormSensor", ReceiveComandDiv.A传感器上报, (report) =>
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
@@ -918,6 +924,9 @@
        {
            //把静态变量的这个东西置空
            instance = null;
            HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormDeviceStatus");
            HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormDeviceOnline");
            HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormSensor");
            base.CloseFormBefore();
        }