JLChen
2020-07-10 7b43f0f5c5dca88576efc0bb51bf95b523de90c9
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -1083,6 +1083,8 @@
                                        #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),
@@ -1118,10 +1120,13 @@
                                                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 };
                                            }
                                        };
@@ -1150,10 +1155,19 @@
                                                }
                                                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 &&