| | |
| | | Tag = "Logic"; |
| | | } |
| | | /// <summary> |
| | | /// 设备延时时间 |
| | | /// </summary> |
| | | private string strdelay = "0"; |
| | | /// <summary> |
| | | /// 显示设备延时时间 |
| | | /// </summary> |
| | | private Button btnDelay =null; |
| | | /// <summary> |
| | | /// 定义一个记录选中设备状态列表; |
| | | /// </summary> |
| | | private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>(); |
| | |
| | | LogicView.FunTypeView lightSwitchView = new LogicView.FunTypeView(); |
| | | lightSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(lightSwitchView.FLayoutView()); |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, lightSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | brightnessView.btnText.TextID = StringId.brightnesLogic; |
| | | fLayout.AddChidren(brightnessView.FLayoutView()); |
| | | brightnessView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 |
| | | ///设备延时iewv |
| | | DelayView(fLayout, brightnessView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); |
| | | curtainSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(curtainSwitchView.FLayoutView()); |
| | | ///设备延时iewv |
| | | DelayView(fLayout, curtainSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | acSpeedView.frameLayout.Y = acModehView.frameLayout.Bottom; |
| | | acSpeedView.btnText.TextID = StringId.speedLogic; |
| | | fLayout.AddChidren(acSpeedView.FLayoutView()); |
| | | ///设备延时iewv |
| | | DelayView(fLayout, acModehView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | floorHeatingModehView.btnText.TextID = StringId.modeLogic; |
| | | fLayout.AddChidren(floorHeatingModehView.FLayoutView()); |
| | | |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, floorHeatingModehView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | AirFreshSpeedView.frameLayout.Y = AirFreshSwitchVie.frameLayout.Bottom; |
| | | AirFreshSpeedView.btnText.TextID = StringId.speedLogic; |
| | | fLayout.AddChidren(AirFreshSpeedView.FLayoutView()); |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, AirFreshSpeedView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | Output outputDevice = new Output(); |
| | | outputDevice.target_type = "1"; |
| | | outputDevice.sid = device.sid; |
| | | outputDevice.delay= strdelay; |
| | | switch (device.spk) |
| | | { |
| | | case SPK.LightDimming: |
| | |
| | | if (edit) |
| | | { |
| | | //更新延时时间 |
| | | outputDevice.delay = Logic.currlogic.output[index].delay; |
| | | outputDevice.delay = strdelay;//Logic.currlogic.output[index].delay; |
| | | //移除旧数据 |
| | | Logic.currlogic.output.RemoveAt(index); |
| | | //新数据插入旧数据的位置; |
| | |
| | | #endregion |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 延时View |
| | | /// </summary> |
| | | /// <param name="fLayout">父控件</param> |
| | | /// <param name="bottomY">在哪个控件下面</param> |
| | | private void DelayView(FrameLayout fLayout, int bottomY) |
| | | { |
| | | LogicView.FunTypeView delayView = new LogicView.FunTypeView(); |
| | | delayView.frameLayout.Y = bottomY; |
| | | delayView.btnText.TextID = StringId.Delay; |
| | | delayView.btnState.Text = strdelay + "s"; |
| | | fLayout.AddChidren(delayView.FLayoutView()); |
| | | ///赋值对象 |
| | | this.btnDelay = delayView.btnState; |
| | | ///延时点击事件 |
| | | delayView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod(); |
| | | inpOrOutLogicMethod.Delayed(this, strdelay, (value) => |
| | | { |
| | | selectedState = "delay_" + strdelay; |
| | | strdelay = value.ToString(); |
| | | delayView.btnState.Text = strdelay + "s"; |
| | | }); |
| | | }; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 开关=功能下一级界面 |
| | | /// </summary> |
| | |
| | | //有数据重新赋值 |
| | | dicSateteList = dicList; |
| | | } |
| | | if (this.btnDelay != null) |
| | | { |
| | | ///延时显示文本 |
| | | this.btnDelay.Text = outputs.delay + "s"; |
| | | this.strdelay = outputs.delay; |
| | | } |
| | | InpOrOutLogicMethod.EditState(device, dicList, button1, button2, button3, button4); |
| | | } |
| | | /// <summary> |