| | |
| | | #endregion |
| | | } else if (deviceCommon.Type == DeviceType.CurtainModel || deviceCommon.Type == DeviceType.CurtainTrietex || deviceCommon.Type == DeviceType.CurtainRoller) { |
| | | #region 窗帘 |
| | | //2020-07-09 刷新控制操作码 |
| | | deviceCommon.Command = (int)Command.UpdataCurtainModelStutas; |
| | | tempSwitch.RemoveFromParent (); |
| | | var tempSwitch1 = new Button () { |
| | | Width = Application.GetMinRealAverage (90), |
| | |
| | | btnChoose.IsSelected = true; |
| | | } |
| | | deviceCommon.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { |
| | | //2020-07-09 |
| | | DeviceInfo mDeviceInfo = timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath); |
| | | if (mDeviceInfo == null) { |
| | | timerControlDeviceList.Add (deviceCommon); |
| | | } else { |
| | | timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | mDeviceInfo.Command = (int)Command.UpdataCurtainModelStutas; |
| | | mDeviceInfo.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | } |
| | | }; |
| | | |
| | |
| | | } |
| | | deviceCommon.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | |
| | | if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { |
| | | //if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { |
| | | // timerControlDeviceList.Add (deviceCommon); |
| | | //} else { |
| | | // timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | //} |
| | | |
| | | //2020-07-09 |
| | | DeviceInfo mDeviceInfo = timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath); |
| | | if (mDeviceInfo == null) { |
| | | timerControlDeviceList.Add (deviceCommon); |
| | | } else { |
| | | timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | mDeviceInfo.Command = (int)Command.UpdataCurtainModelStutas; |
| | | mDeviceInfo.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; |
| | | } |
| | | } else { |
| | | timerControlDeviceList.Remove (timerControlDeviceList.Find ((obj) => obj.DeviceType == (int)deviceCommon.Type && |