| | |
| | | } |
| | | if (deviceUI.CommonDevice.Type == DeviceType.OnOffOutput) |
| | | { |
| | | var light = deviceUI.CommonDevice as ToggleLight;
|
| | | var light = deviceUI.CommonDevice as ToggleLight; |
| | | light.IsOnline = (common as ToggleLight).IsOnline; |
| | | deviceIMG.IsSelected = light.IsOnline == 1; |
| | | light.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | {
|
| | | { |
| | | System.Console.WriteLine($"Error:{ex.Message}"); |
| | | } |
| | | }); |
| | |
| | | { |
| | | ZbGateway.StatusList.Remove(this); |
| | | action(); |
| | | action = null; |
| | | RemoveUpdateControlDeviceStatuAction(); |
| | | base.RemoveFromParent(); |
| | | } |
| | |
| | | Shared.Common.Room.Lists[0].AddDevice(device.FileName); |
| | | collectionBtn.IsSelected = true; |
| | | } |
| | | action?.Invoke(); |
| | | } |
| | | |
| | | #endregion |