| | |
| | | #endregion |
| | | } |
| | | break; |
| | | //海信电视 |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | | LogicView.FunTypeView switchView = new LogicView.FunTypeView(); |
| | | switchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(switchView.FLayoutView()); |
| | | ///音量 |
| | | LogicView.FunTypeView volView = new LogicView.FunTypeView(); |
| | | volView.frameLayout.Y = switchView.frameLayout.Bottom; |
| | | volView.btnText.TextID = StringId.yinliang; |
| | | fLayout.AddChidren(volView.FLayoutView()); |
| | | |
| | | ///信号源 |
| | | LogicView.FunTypeView sourceView = new LogicView.FunTypeView(); |
| | | sourceView.frameLayout.Y = volView.frameLayout.Bottom; |
| | | sourceView.btnText.TextID = StringId.xinhaoyuan; |
| | | fLayout.AddChidren(sourceView.FLayoutView()); |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, sourceView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | | switchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, switchView.btnState, 2); |
| | | }; |
| | | ///音量点击事件 |
| | | volView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //selectedState = device.spk + "_volume"; |
| | | //new LogicView.TipPopView { }.InputBox(StringId.volumeMusic, volView.btnState.Text, (value) => |
| | | //{ |
| | | |
| | | // //界面显示选中值 |
| | | // volView.btnState.Text = value; |
| | | // //数据封装 |
| | | // AddDictionary("setvolume", value);//音量 |
| | | //}, 0, 100); |
| | | |
| | | BrightnessMethod(device, volView.btnState, volView.btnText.Text); |
| | | |
| | | }; |
| | | |
| | | ///信号源点击事件 |
| | | sourceView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ///之前的状态文本 |
| | | string currText = sourceView.btnState.Text; |
| | | //设备属性值,云雀上定义好的; |
| | | string key = "signal"; |
| | | selectedState = device.spk + "_" + key; |
| | | PublicInterface pif = new PublicInterface(); |
| | | var dic = pif.GetHisenseSignalSourceDic(); |
| | | pif.SingleSelectionShow(this, dic.Keys.ToList(), Language.StringByID(StringId.xinhaoyuan), currText |
| | | , (valueStr) => |
| | | { |
| | | //界面显示选中值 |
| | | sourceView.btnState.Text = valueStr; |
| | | string value = pif.GetValue(dic, valueStr); |
| | | //数据封装 |
| | | AddDictionary(key, value); |
| | | |
| | | }); |
| | | }; |
| | | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditDeviceState(device, index, switchView.btnState, volView.btnState, sourceView.btnState, null); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | break; |
| | | |
| | | } |
| | | #endregion |
| | |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | if ("on" == value) |
| | | { |
| | | key = "wol"; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //数据封装 |
| | |
| | | //角度 |
| | | keyVlaue = "angle"; |
| | | } |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | keyVlaue = "set_volume"; |
| | | } |
| | | break; |
| | | |
| | |
| | | /// <returns></returns> |
| | | private void AddDictionaryList(string key, Dictionary<string, string> dictionary) |
| | | { |
| | | |
| | | if (this.device.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | //特殊处理 |
| | | if (key == "on_off") |
| | | { |
| | | key = "wol"; |
| | | } |
| | | else if (key == "wol") |
| | | { |
| | | key = "on_off"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | int indexValue = -1; |