| | |
| | | #endregion |
| | | } |
| | | break; |
| | | case SPK.CurtainDream: |
| | | { |
| | | #region 界面 |
| | | ///百分比 |
| | | LogicView.FunTypeView crtainPercentumView = new LogicView.FunTypeView(); |
| | | crtainPercentumView.btnText.TextID = StringId.percentum; |
| | | fLayout.AddChidren(crtainPercentumView.FLayoutView()); |
| | | crtainPercentumView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 |
| | | ///角度 |
| | | LogicView.FunTypeView AngleView = new LogicView.FunTypeView(); |
| | | AngleView.frameLayout.Y = crtainPercentumView.frameLayout.Bottom; |
| | | AngleView.btnText.TextID = StringId.Angle; |
| | | fLayout.AddChidren(AngleView.FLayoutView()); |
| | | AngleView.btnState.Text = "10°"; |
| | | ///设备延时iewv |
| | | DelayView(fLayout, AngleView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | |
| | | ///百分比点击事件 |
| | | crtainPercentumView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BrightnessMethod(device, crtainPercentumView.btnState, crtainPercentumView.btnText.Text); |
| | | }; |
| | | ///角度点击事件 |
| | | AngleView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BrightnessMethod(device, AngleView.btnState, AngleView.btnText.Text); |
| | | }; |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, crtainPercentumView.btnState, AngleView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | | break; |
| | | case SPK.AcStandard: |
| | | case SPK.HvacAC: |
| | | { |
| | |
| | | //之前的状态值 |
| | | string stateVlaue = button.Text; |
| | | LogicView.BrightnessView brightness = new LogicView.BrightnessView(); |
| | | brightness.FLayoutView(this, titleName, stateVlaue, (brightnesValue) => |
| | | brightness.FLayoutView(this, titleName, stateVlaue, (brightnesValue, unitStr) => |
| | | { |
| | | //界面显示选中值 |
| | | button.Text = brightnesValue + "%"; |
| | | button.Text = brightnesValue + unitStr; |
| | | selectedState = device.spk + brightnesValue.ToString(); |
| | | //设备属性值,云雀上定义好的; |
| | | string keyVlaue = ""; |
| | |
| | | break; |
| | | case SPK.CurtainRoller: |
| | | case SPK.CurtainTrietex: |
| | | case SPK.CurtainDream: |
| | | { |
| | | keyVlaue = "percent"; |
| | | if (unitStr == "°") |
| | | { |
| | | //角度 |
| | | keyVlaue = "angle"; |
| | | } |
| | | } |
| | | break; |
| | | } |