| | |
| | | lightSwitchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(lightSwitchView.FLayoutView()); |
| | | |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, lightSwitchView.frameLayout.Bottom); |
| | | #endregion |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, lightSwitchView.btnState, null, null, null); |
| | | GetEditDeviceState(device, index, lightSwitchView.btnState, null, null, null); |
| | | } |
| | | #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 |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, lightSwitchView.btnState, brightnessView.btnState, null, null); |
| | | GetEditDeviceState(device, index, lightSwitchView.btnState, brightnessView.btnState, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, curtainSwitchView.btnState, null, null, null); |
| | | GetEditDeviceState(device, index, curtainSwitchView.btnState, null, null, null); |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | ///开关点击事件 |
| | | curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 3); |
| | | SwitchViewMethod(device, curtainSwitchView.btnState, 2); |
| | | }; |
| | | ///百分比点击事件 |
| | | crtainPercentumView.btnClick.MouseUpEventHandler += (sender, e) => |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditState(device, index, curtainSwitchView.btnState, crtainPercentumView.btnState, null, null); |
| | | GetEditDeviceState(device, index, curtainSwitchView.btnState, crtainPercentumView.btnState, null, null); |
| | | } |
| | | #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) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | 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, (index2) => |
| | | { |
| | | var musicSelecetd = palyList.songs[index2]; |
| | | //界面显示选中值 |
| | | 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(); |
| | |
| | | /// <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; |
| | | } |
| | | //数据封装 |
| | | 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> |