2023年09月25日19:49:23
海信开,自动化和功能,分类都已经实现,场景还没有实现;
| | |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | string on_off = GetKeyValue("on_off", dicList); |
| | | string on = GetKeyValue("wol", dicList); |
| | | string off = GetKeyValue("on_off", dicList); |
| | | string volumet = GetKeyValue("set_volume", dicList); |
| | | string signal = GetKeyValue("signal", dicList); |
| | | if (!string.IsNullOrEmpty(on_off)) |
| | | { |
| | | if (on_off == "on") |
| | | { |
| | | stateStr = Language.StringByID(StringId.onLogic); |
| | | } |
| | | else |
| | | |
| | | if (!string.IsNullOrEmpty(off)) |
| | | { |
| | | stateStr = Language.StringByID(StringId.offLogic); |
| | | //如果关了,其它属性不显示 |
| | | break; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(on)) |
| | | { |
| | | stateStr = Language.StringByID(StringId.onLogic); |
| | | } |
| | | if (!string.IsNullOrEmpty(stateStr)) |
| | | { |
| | |
| | | { |
| | | case "on_off": |
| | | { |
| | | switch (value) |
| | | { |
| | | case "on": |
| | | { |
| | | button1.Text = Language.StringByID(StringId.onLogic); |
| | | } |
| | | break; |
| | | case "off": |
| | | if (value == "off") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.offLogic); |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case "wol": |
| | | { |
| | | if (value == "on") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.onLogic); |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | |
| | |
| | | /// </summary> |
| | | private Button btnDelay =null; |
| | | /// <summary> |
| | | /// 当前设备 |
| | | /// </summary> |
| | | private Function device; |
| | | /// <summary> |
| | | /// 定义一个记录选中设备状态列表; |
| | | /// </summary> |
| | | private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>(); |
| | |
| | | public void Show(Entity.Function device, int index, bool edit) |
| | | { |
| | | #region 界面布局 |
| | | this.device = device; |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | LogicView.TopView topView = new LogicView.TopView(); |
| | | this.AddChidren(topView.FLayoutView()); |
| | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //界面显示选中值 |
| | | button.TextID = id; |
| | | selectedState = device.spk + "_" + value; |
| | |
| | | if (button.Name == "colorful") |
| | | { |
| | | key = "colorful"; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | if ("on" == value) |
| | | { |
| | | key = "wol"; |
| | | } |
| | | |
| | | } |
| | |
| | | /// <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; |
| | | for (int i = 0; i < dicSateteList.Count; i++) |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加目标 |
| | | /// </summary> |
| | |
| | | public class HisenseTVFunctionalAttributeConstant |
| | | { |
| | | /// <summary> |
| | | /// 开关(value:0-关/1-开) |
| | | /// 网络唤醒(value:on) |
| | | /// </summary> |
| | | public const string wol = "wol"; |
| | | /// <summary> |
| | | /// 关(value:0-关/1-开) |
| | | /// </summary> |
| | | public const string on_off = "on_off"; |
| | | /// <summary> |
| | |
| | | //开机 |
| | | kaijiFL.SetClickListener((fl, btnImage, btnText) => |
| | | { |
| | | //Send.Current.Open("b7686438"); |
| | | ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "on"); |
| | | ControlCommand(HisenseTVFunctionalAttributeConstant.wol, "on"); |
| | | |
| | | }); |
| | | //关机 |