| | |
| | | /// </summary>
|
| | | public CategoryMainForm()
|
| | | {
|
| | | this.FormID = "CategoryMainForm";
|
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
|
| | | instance = this;
|
| | | }
|
| | |
| | | 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();
|
| | |
| | | {
|
| | | cardContr = new Controls.DeviceDoorLockRowControl();
|
| | | }
|
| | | //色温灯
|
| | | else if (device.Type == DeviceType.ColorTemperatureLight)
|
| | | {
|
| | | cardContr = new Controls.DeviceColorTemperatureRowControl();
|
| | | }
|
| | | //无法识别
|
| | | else
|
| | | {
|
| | |
| | | private void AddNormalDeviceReportEvent()
|
| | | {
|
| | | //设备属性上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceStatus", ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormDeviceStatus", ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | | });
|
| | |
|
| | | //设备在线上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceOnline", ReceiveComandDiv.A设备在线上报, (report) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormDeviceOnline", ReceiveComandDiv.A设备在线上报, (report) =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | | private void AddSensorDeviceReportEvent()
|
| | | {
|
| | | //传感器上报(缓存的修改交由 HdlGatewayReceiveLogic 处理)
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewSensor", ReceiveComandDiv.A传感器上报, (report) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("CategoryMainFormSensor", ReceiveComandDiv.A传感器上报, (report) =>
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | | {
|
| | | //把静态变量的这个东西置空
|
| | | instance = null;
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormDeviceStatus");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormDeviceOnline");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("CategoryMainFormSensor");
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|