| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, lightSwitchView.btnState, null, null, null); |
| | | GetEditDeviceState(device, index, lightSwitchView.btnState, null, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, lightSwitchView.btnState, brightnessView.btnState, null, null); |
| | | GetEditDeviceState(device, index, lightSwitchView.btnState, brightnessView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | | break; |
| | | //窗帘 |
| | | case SPK.CurtainSwitch: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | | LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); |
| | | curtainSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(curtainSwitchView.FLayoutView()); |
| | | DelayView(fLayout, curtainSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | | curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 3); |
| | | }; |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditDeviceState(device, index, curtainSwitchView.btnState, null, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | | break; |
| | | case SPK.CurtainTrietex: |
| | | case SPK.CurtainRoller: |
| | | { |
| | |
| | | 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 |
| | | ///设备延时iewv |
| | | DelayView(fLayout, curtainSwitchView.frameLayout.Bottom); |
| | | DelayView(fLayout, crtainPercentumView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | |
| | | { |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 2); |
| | | }; |
| | | ///百分比点击事件 |
| | | crtainPercentumView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BrightnessMethod(device, crtainPercentumView.btnState, crtainPercentumView.btnText.Text); |
| | | }; |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, curtainSwitchView.btnState, null, null, null); |
| | | GetEditDeviceState(device, index, curtainSwitchView.btnState, crtainPercentumView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, crtainPercentumView.btnState, AngleView.btnState, null, null); |
| | | GetEditDeviceState(device, index, crtainPercentumView.btnState, AngleView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, acSwitchVie.btnState, temperatureView.btnState, acModehView.btnState, acSpeedView.btnState); |
| | | GetEditDeviceState(device, index, acSwitchVie.btnState, temperatureView.btnState, acModehView.btnState, acSpeedView.btnState); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | break; |
| | | case SPK.FloorHeatStandard:case SPK.HvacFloorHeat: |
| | | case SPK.FloorHeatStandard: |
| | | case SPK.HvacFloorHeat: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, floorHeatingSwitchVie.btnState, temperatureView.btnState, floorHeatingModehView.btnState, null); |
| | | GetEditDeviceState(device, index, floorHeatingSwitchVie.btnState, temperatureView.btnState, floorHeatingModehView.btnState, null); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, AirFreshSwitchVie.btnState, AirFreshSpeedView.btnState, null, null); |
| | | GetEditDeviceState(device, index, AirFreshSwitchVie.btnState, AirFreshSpeedView.btnState, null, null); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | break; |
| | | //音乐 |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | { |
| | | #region 界面 |
| | | //提示语音 |
| | | LogicView.FunTypeView funTypeView = new LogicView.FunTypeView(); |
| | | funTypeView.btnText.TextID = StringId.tishiyin; |
| | | fLayout.AddChidren(funTypeView.FLayoutView()); |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, funTypeView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///提示语音点击事件 |
| | | funTypeView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | selectedState = device.spk + "_"; |
| | | Loading loading = new Loading(); |
| | | this.AddChidren(loading); |
| | | loading.Start(); |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | try |
| | | { |
| | | //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device); |
| | | //var palyListName = Music.SendMethod.mMethod.GetListName(device); |
| | | var palyList= Music.SendMethod.Current.GetListMusic(device, "hdl_special"); |
| | | List<string> musicNameList = new List<string>(); |
| | | for (int i = 0; i < palyList.songs.Count; i++) |
| | | { |
| | | var music = palyList.songs[i]; |
| | | musicNameList.Add(music.name); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | PublicInterface publicInterface = new PublicInterface(); |
| | | publicInterface.FrameOrVv(this, musicNameList, new List<string> { funTypeView.btnState.Text }, palyList.group, (index) => |
| | | { |
| | | var musicSelecetd = palyList.songs[index]; |
| | | //界面显示选中值 |
| | | funTypeView.btnState.Text = musicSelecetd.name; |
| | | //数据封装 |
| | | AddDictionary("playlist_name", palyList.group);//列表名 |
| | | AddDictionary("song_name", musicSelecetd.name);//歌曲名 |
| | | |
| | | },false); |
| | | |
| | | }); |
| | | } |
| | | catch { } |
| | | |
| | | }); |
| | | }; |
| | | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditDeviceState(device, index, funTypeView.btnState, null, null, null); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | Output outputDevice = new Output(); |
| | | outputDevice.target_type = "1"; |
| | | outputDevice.sid = device.sid; |
| | | outputDevice.delay= strdelay; |
| | | outputDevice.delay = strdelay; |
| | | switch (device.spk) |
| | | { |
| | | case SPK.LightDimming: |
| | |
| | | } |
| | | case SPK.HvacAC: |
| | | case SPK.AcStandard: |
| | | case SPK.FloorHeatStandard:case SPK.HvacFloorHeat: |
| | | case SPK.FloorHeatStandard: |
| | | case SPK.HvacFloorHeat: |
| | | { |
| | | //做了一个特殊处理; |
| | | bool _bool = false; |
| | |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | outputDevice.status = dicSateteList; |
| | | |
| | |
| | | this.RemoveFromParent(); |
| | | return; |
| | | } |
| | | LogicMethod.CurrLogicMethod.RemoveAllView(); |
| | | LogicMethod.Current.RemoveAllView(); |
| | | AddLogic addLogic = new AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |
| | |
| | | break; |
| | | } |
| | | //数据封装 |
| | | AddDictionary(keyVlaue, brightnesValue); |
| | | AddDictionary(keyVlaue, brightnesValue); |
| | | }); |
| | | #endregion |
| | | |
| | |
| | | /// <param name="button2">显示Btn</param> |
| | | /// <param name="button3">显示Btn</param> |
| | | /// <param name="button4">显示Btn</param> |
| | | private void GetEditState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4) |
| | | private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4) |
| | | { |
| | | Output outputs = Logic.currlogic.output[index]; |
| | | var dicList = outputs.status; |
| | |
| | | this.btnDelay.Text = outputs.delay + "s"; |
| | | this.strdelay = outputs.delay; |
| | | } |
| | | InpOrOutLogicMethod.EditState(device, dicList, button1, button2, button3, button4); |
| | | InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4); |
| | | } |
| | | /// <summary> |
| | | /// 添加选中数据 |
| | |
| | | { |
| | | //数据封装 |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue); |
| | | LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue); |
| | | LogicMethod.Current.dictionary(dic, "key", KeyValue); |
| | | LogicMethod.Current.dictionary(dic, "value", selectedValue); |
| | | AddDictionaryList(KeyValue, dic); |
| | | } |
| | | /// <summary> |