| | |
| | | X = btnTime.Right + Application.GetRealWidth (190), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth (75), |
| | | Height = Application.GetRealHeight (75), |
| | | Height = Application.GetRealWidth (75), |
| | | UnSelectedImagePath = "CrabtreeAdd/Timer.png", |
| | | }; |
| | | timeView.AddChidren (btnTimeIcon); |
| | |
| | | |
| | | if (btnMonday.IsSelected == false && btnFriday.IsSelected == false && btnThursday.IsSelected == false && btnSunday.IsSelected == false && btnTuesday.IsSelected == false && btnSaturday.IsSelected == false && btnWednesday.IsSelected == false) { |
| | | //new Alert ("", "请选择日期!", "Close").Show (); |
| | | new Alert ("", "Please setting date!", "Close").Show (); |
| | | new Alert ("", "Please select the days.", "Close").Show (); |
| | | return; |
| | | } |
| | | |
| | | string mTimerName = etName.Text.Trim (); |
| | | if (string.IsNullOrEmpty (mTimerName)) { |
| | | //new Alert ("", "请填写定时器名称!", "Close").Show (); |
| | | new Alert ("", "Please set name for the timer!", "Close").Show (); |
| | | new Alert ("", "Please fill the tab Lable name.", "Close").Show (); |
| | | return; |
| | | } |
| | | //else if (listTimer.Find ((obj) => obj.TimerName == timerTemp.TimerName) != null && !isEdit) {//2020-01-09 编辑的时候也提示重复名字 |
| | |
| | | Application.RunOnMainThread (() => { |
| | | if (revertObj == null) { |
| | | new Alert ("", "Unable to save data, please check the network.", "Close").Show (); |
| | | } else if (revertObj.StateCode.ToUpper() == "SUCCESS") { |
| | | } else if (revertObj.StateCode.ToUpper() == StateCode.SUCCESS) { |
| | | this.RemoveFromParent (); |
| | | action (timerTemp); |
| | | } else { |
| | |
| | | Tag = deviceCommon.CommonLoopID, |
| | | }; |
| | | DeviceRowView.AddChidren (tempSwitch); |
| | | |
| | | |
| | | |
| | | if (deviceCommon.Type == DeviceType.FanModule) { |
| | | #region 风扇 |
| | |
| | | ProgressColor = SkinStyle.Current.SelectedColor, |
| | | ThumbRadius = Application.GetRealWidth (3), |
| | | Max = 8, |
| | | Progress =2,// (int)(deviceCommon.SendBytes[1]), |
| | | Progress = 2,// (int)(deviceCommon.SendBytes[1]), |
| | | |
| | | }; |
| | | DeviceRowView.AddChidren (fanLevel); |
| | |
| | | #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), |
| | | Height = Application.GetMinRealAverage (53), |
| | | X = Application.GetRealWidth (640 - 90 - 20), |
| | | Radius = 5, |
| | | var tempSwitch1 = new Button () { |
| | | Width = Application.GetMinRealAverage (90), |
| | | Height = Application.GetMinRealAverage (53), |
| | | X = Application.GetRealWidth (640 - 90 - 20), |
| | | Radius = 5, |
| | | BorderColor = SkinStyle.Current.Transparent, |
| | | BorderWidth = 1, |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | 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 && |