| | |
| | | lightSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(lightSwitchView.FLayoutView()); |
| | | |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, lightSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | |
| | | brightnessView.frameLayout.Y = lightSwitchView.frameLayout.Bottom; |
| | | brightnessView.btnText.TextID = StringId.brightnesLogic; |
| | | fLayout.AddChidren(brightnessView.FLayoutView()); |
| | | //brightnessView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 |
| | | brightnessView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 |
| | | ///设备延时iewv |
| | | DelayView(fLayout, brightnessView.frameLayout.Bottom); |
| | | #endregion |
| | |
| | | break; |
| | | //窗帘 |
| | | case SPK.CurtainSwitch: |
| | | case SPK.CurtainTrietex: |
| | | case SPK.CurtainRoller: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | | LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); |
| | | curtainSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(curtainSwitchView.FLayoutView()); |
| | | ///设备延时iewv |
| | | DelayView(fLayout, curtainSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | | curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 3); |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 2); |
| | | }; |
| | | if (edit) |
| | | { |
| | |
| | | #endregion |
| | | } |
| | | break; |
| | | case SPK.CurtainTrietex: |
| | | case SPK.CurtainRoller: |
| | | case SPK.CurtainDream: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | | LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); |
| | | curtainSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(curtainSwitchView.FLayoutView()); |
| | | ///百分比 |
| | | LogicView.FunTypeView crtainPercentumView = new LogicView.FunTypeView(); |
| | | crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom; |
| | | 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, crtainPercentumView.frameLayout.Bottom); |
| | | DelayView(fLayout, AngleView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | | curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 2); |
| | | }; |
| | | |
| | | ///百分比点击事件 |
| | | 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, curtainSwitchView.btnState, crtainPercentumView.btnState, null, null); |
| | | GetEditState(device, index, crtainPercentumView.btnState, AngleView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | /// <summary> |
| | | /// 亮度/百分比=功能下一级界面 |
| | | /// </summary> |
| | | /// <param name="device">设备对象</param> |
| | | /// <param name="button">显示状态对象</param> |
| | | /// <param name="titleName">标题</param> |
| | | /// <param name="device"></param> |
| | | /// <param name="button"></param> |
| | | private void BrightnessMethod(Entity.Function device, Button button, string titleName) |
| | | { |
| | | #region 界面 |
| | | //之前的状态值 |
| | | 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; |
| | | } |