wjc
2023-08-22 8cefc1f93fc2db49465a5dd11ce94ed11267ea53
2023年08月22日17:48:30

备份一下代码
1个文件已添加
10个文件已修改
598 ■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 135 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs 199 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -1249,6 +1249,17 @@
8720=Channel
8721=Control
8801=Home page
8802=Power off
8803=Volume
8804=Setting
8805=Unmute
8806=Signal source
8807=Power off
8808=Power on
8809=Stripping equipment
@@ -2622,9 +2633,15 @@
8720=频道
8721=控制
8801=首页
8802=关机
8803=音量
8804=设置
8805=解除静音
8806=信号源
8807=已关机
8808=开机
8809=解绑设备
@@ -3985,6 +4002,16 @@
8720=Channel
8721=Control
8801=Home page
8802=Power off
8803=Volume
8804=Setting
8805=Unmute
8806=Signal source
8807=Power off
8808=Power on
8809=Stripping equipment
@@ -5340,6 +5367,16 @@
8719=Conform action
8720=Channel
8721=Control
8801=Home page
8802=Power off
8803=Volume
8804=Setting
8805=Unmute
8806=Signal source
8807=Power off
8808=Power on
8809=Stripping equipment
9000=Inicio sesión con un nuevo número de teléfono celular 
9001=Inicie sesión con una nueva dirección de correo eléctrónico 
@@ -6701,6 +6738,16 @@
8720=Channel
8721=Control
8801=Home page
8802=Power off
8803=Volume
8804=Setting
8805=Unmute
8806=Signal source
8807=Power off
8808=Power on
8809=Stripping equipment
HDL_ON/Common/R.cs
@@ -3632,6 +3632,43 @@
        /// <summary>
        /// 首页
        /// </summary>
        public const int shouye = 8801;
        /// <summary>
        /// 关机
        /// </summary>
        public const int guanji = 8802;
        /// <summary>
        /// 音量
        /// </summary>
        public const int yinliang = 8803;
        /// <summary>
        /// 设置
        /// </summary>
        public const int shezhi = 8804;
        /// <summary>
        /// 解除静音
        /// </summary>
        public const int jiechujingyin = 8805;
        /// <summary>
        /// 信号源
        /// </summary>
        public const int xinhaoyuan = 8806;
        /// <summary>
        /// 已关机
        /// </summary>
        public const int yiguanji = 8807;
        /// <summary>
        /// 开机
        /// </summary>
        public const int kaiji = 8808;
        /// <summary>
        /// 解绑设备
        /// </summary>
        public const int jiebangshebei = 8809;
HDL_ON/HDL_ON.projitems
@@ -593,6 +593,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryInfoEntity.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTvPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTVFunctionalAttributeConstant.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/MainPage.cs
@@ -622,6 +622,7 @@
            if (msg.Contains("收到数据")
                || msg.Contains("发送")
                || msg.Contains("接收到推送")
                   || msg.Contains("api")
                )
                Console.WriteLine(msg);
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -1015,7 +1015,7 @@
                            //区别不同设备,显示不同设备状态
                            switch (device.spk)
                            {
                                case SPK.CommonSeries:
                                    targetView.btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/groupControl.png";
                                    stateStr = GetKeyValue("on_off", dicList) == "on" ? Language.StringByID(StringId.onLogic) : Language.StringByID(StringId.offLogic);
@@ -1057,14 +1057,14 @@
                                        }
                                    }
                                    break;
                                case SPK.LightRGB:
                                case SPK.LightRGBW:
                                case SPK.LightCCT:
                                case SPK.LightDimming:
                                    {
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string brightness = GetKeyValue("brightness", dicList);
                                        if (on_off == "on" && brightness != "")
@@ -1088,7 +1088,7 @@
                                            //色温这个属性才有效
                                            if (stateStr != Language.StringByID(StringId.offLogic) && GetKeyValue("cct", dicList) != "")
                                            {
                                                stateStr += "," +GetKeyValue("cct", dicList) + "k";
                                                stateStr += "," + GetKeyValue("cct", dicList) + "k";
                                            }
                                        }
                                        if (device.spk == SPK.LightRGB)
@@ -1264,7 +1264,7 @@
                                        if (set_temp != "")
                                        {
                                            string unit =GetTemperatureUnit(device);
                                            string unit = GetTemperatureUnit(device);
                                            stateStr += set_temp + unit + ",";
                                        }
@@ -1475,14 +1475,41 @@
                                    {
                                        string song_name = GetKeyValue("song_name", dicList);
                                        string volume = GetKeyValue("volume", dicList);
                                        stateStr = song_name + ";" +Language.StringByID(StringId.volumeMusic)+volume;
                                        stateStr = song_name + ";" + Language.StringByID(StringId.volumeMusic) + volume;
                                        if (stateStr.StartsWith(";"))
                                        {
                                            stateStr = stateStr.Substring(1, stateStr.Length - 1);
                                        }else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        } else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        {
                                            stateStr = stateStr.Substring(0, stateStr.Length - 3);
                                        }
                                    }
                                    break;
                                case SPK.ElectricalTvHisense:
                                    {
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string signal = GetKeyValue("signal", dicList);
                                        if (!string.IsNullOrEmpty(on_off))
                                        {
                                            if (on_off == "1")
                                            {
                                                stateStr = Language.StringByID(StringId.onLogic);
                                            }
                                            else
                                            {
                                                stateStr = Language.StringByID(StringId.offLogic);
                                            }
                                        }
                                        if (!string.IsNullOrEmpty(stateStr))
                                        {
                                            stateStr += ",";
                                        }
                                        if (!string.IsNullOrEmpty(signal))
                                        {
                                            stateStr += signal.Replace("_", " ");
                                        }
                                        stateStr = stateStr.TrimEnd(',');
                                    }
                                    break;
                            }
@@ -2415,8 +2442,6 @@
                        button1.Tag = tag;
                    }
                    break;
                case SPK.MusicStandard:
                case SPK.AvMusic:
                    {
@@ -2456,6 +2481,46 @@
                        button2.Tag = tag;
                    }
                    break;
                case SPK.ElectricalTvHisense:
                    {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            switch (dic["key"])
                            {
                                case "on_off":
                                    {
                                        switch (value)
                                        {
                                            case "1":
                                                {
                                                    button1.Text = Language.StringByID(StringId.onLogic);
                                                }
                                                break;
                                            case "0":
                                                {
                                                    button1.Text = Language.StringByID(StringId.offLogic);
                                                }
                                                break;
                                        }
                                    }
                                    break;
                                case "signal":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value.Replace("_", " ");
                                    }
                                    break;
                            }
                        }
                    }
                    break;
            }
        }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -131,7 +131,7 @@
        /// <param name="dic">Dictionary类</param>
        /// <param name="key">健</param>
        /// <param name="value">值</param>
        public void dictionary(Dictionary<string, string> dic, string key, string value)
        public void dictionary(Dictionary<string, string> dic, string key, string value)
        {
            if (dic.ContainsKey(key)) //判断是否存在键值
            {
@@ -189,7 +189,7 @@
            list.AddRange(list2);
            list.AddRange(FunctionList.List.groupControls);
#if DEBUG
            //GetTestDevice(ref list, true);
            GetTestDevice(ref list, true);
#endif
            return list;
        }
@@ -586,6 +586,7 @@
            device.spk == SPK.AirSwitch
            || device.spk == SPK.PanelSocket
            || device.spk == SPK.ElectricSocket
            || device.spk == SPK.ElectricalTvHisense
            );
            if (electric != null)
            {
@@ -715,6 +716,7 @@
                functionTypeList.Add(SPK.AirSwitch);
                functionTypeList.Add(SPK.PanelSocket);
                functionTypeList.Add(SPK.ElectricSocket);
                functionTypeList.Add(SPK.ElectricalTvHisense);
            }
            ///门锁类
            else if (deviceType == Language.StringByID(StringId.DoorLock))
@@ -807,6 +809,7 @@
                functionTypeList.Add(SPK.VideoDoorLock);
                functionTypeList.Add(SPK.AcIr);
                functionTypeList.Add(SPK.SensorPirHold);
                functionTypeList.Add(SPK.ElectricalTvHisense);
            }
@@ -896,6 +899,7 @@
                        deviceTypeList.Add(SPK.AvMusic);
                        deviceTypeList.Add(SPK.MechanicalArm);
                        deviceTypeList.Add(SPK.AcIr);
                        deviceTypeList.Add(SPK.ElectricalTvHisense);
                    }
                    break;
            }
@@ -1226,6 +1230,7 @@
                              new Entity.Function { sid = "12345678991234566844", name = "大华摄像头", spk = Entity.SPK.IpCam_Imou },
                                 new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB },
                                  new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW },
                                     new Function { spk = SPK.ElectricalTvHisense, name = "海信电视1",sid="123456789"},
            };
                foreach (var function in functions)
                {
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -804,6 +804,90 @@
                        #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 = switchView.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("volume", 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 sourceList = new List<string>();
                            sourceList.Add("HDML 1");
                            sourceList.Add("HDML 2");
                            sourceList.Add("HDML 3");
                            sourceList.Add("HDML 4");
                            sourceList.Add("Live TV");
                            sourceList.Add("PS");
                            sourceList.Add("AV");
                            pif.SingleSelectionShow(this, sourceList, Language.StringByID(StringId.xinhaoyuan), currText
                               , (valueStr) =>
                               {
                                   //界面显示选中值
                                   sourceView.btnState.Text = valueStr;
                                   string value = valueStr.Replace(" ", "_");
                                   //数据封装
                                   AddDictionary(key, value);
                               });
                        };
                        if (edit)
                        {
                            //显示编辑之前的设备状态
                            GetEditDeviceState(device, index, switchView.btnState, sourceView.btnState, null, null);
                        }
                        #endregion
                    }
                    break;
            }
            #endregion
@@ -977,10 +1061,10 @@
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
            this.AddChidren(frame);
            LogicView.SwitchView switchView = new LogicView.SwitchView();
            switchView.FLayoutView(frame, len, button.Text, (strValue) =>
            switchView.FLayoutView(frame, len, button.Text, (value) =>
            {
                int id = 0;
                switch (strValue)
                switch (value)
                {
                    case "on":
                        {
@@ -1000,16 +1084,16 @@
                }
                //界面显示选中值
                button.TextID = id;
                selectedState = device.spk + "_" + strValue;
                selectedState = device.spk + "_" + value;
                //设备属性值,云雀上定义好的;
                string keyVlaue = "on_off";
                string key = "on_off";
                switch (device.spk)
                {
                    case SPK.PanelSocket:
                        {
                            if (button.Name == "总控开关")
                            {
                                keyVlaue = "on_off_master";
                                key = "on_off_master";
                            }
                        }
                        break;
@@ -1017,14 +1101,29 @@
                        {
                            if (button.Name == "colorful")
                            {
                                keyVlaue = "colorful";
                                key = "colorful";
                            }
                        }
                        break;
                    case SPK.ElectricalTvHisense:
                        {
                            if (id == StringId.onLogic)
                            {
                                value = "1";
                            }
                            else
                            {
                                value = "0";
                            }
                        }
                        break;
                }
                //数据封装
                AddDictionary(keyVlaue, strValue);
                AddDictionary(key, value);
            });
            #endregion
        }
@@ -1150,8 +1249,6 @@
        }
        /// <summary>
        /// 显示编辑之前的设备状态
        /// </summary>
@@ -1184,29 +1281,29 @@
        /// <summary>
        /// 添加选中数据
        /// </summary>
        /// <param name="KeyValue">设备属性值,云雀上定义好的</param>
        /// <param name="selectedValue">状态值</param>
        private void AddDictionary(string KeyValue, string selectedValue)
        /// <param name="key">设备属性值,云雀上定义好的</param>
        /// <param name="value">状态值</param>
        private void AddDictionary(string key, string value)
        {
            //数据封装
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.Current.dictionary(dic, "key", KeyValue);
            LogicMethod.Current.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic);
            LogicMethod.Current.dictionary(dic, "key", key);
            LogicMethod.Current.dictionary(dic, "value", value);
            AddDictionaryList(key, dic);
        }
        /// <summary>
        /// 更新数据列表
        /// </summary>
        /// <param name="keyValue">设备属性值,云雀上定义好的</param>
        /// <param name="key">设备属性值,云雀上定义好的</param>
        /// <param name="dictionary">添加选中数据</param>
        /// <returns></returns>
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
        private void AddDictionaryList(string key, Dictionary<string, string> dictionary)
        {
            int indexValue = -1;
            for (int i = 0; i < dicSateteList.Count; i++)
            {
                var dic = dicSateteList[i];
                if (dic.ContainsValue(keyValue))
                if (dic.ContainsValue(key))
                {
                    //判断是否存在
                    indexValue = i;
@@ -1227,7 +1324,7 @@
                dicSateteList.Add(dictionary);
            }
        }
        }
        /// <summary>
        /// 添加目标
        /// </summary>
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_AuthorizedPage.cs
@@ -24,7 +24,9 @@
        public void LoadView()
        {
            string url = brand_Iot.authorizationUrl + $"?companyId={brand_Iot.companyId}&openUId={UserInfo.Current.ID}&client_id={brand_Iot.clientId}";
            //高胜说不需要拼接url 2023年08月22日10:19:50
            //string url = brand_Iot.authorizationUrl + $"?companyId={brand_Iot.companyId}&openUId={UserInfo.Current.ID}&client_id={brand_Iot.clientId}";
            string url = brand_Iot.authorizationUrl;
            var dd = new WebViewDialog(()=> {
                UnsubscribeAsync3tyIotbind();
            });
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTVFunctionalAttributeConstant.cs
New file
@@ -0,0 +1,58 @@
using System;
namespace HDL_ON.UI.UI2.FuntionControlView.HisenseTV
{
    /// <summary>
    /// 海信电视功能属性常量
    /// </summary>
    public class HisenseTVFunctionalAttributeConstant
    {
        /// <summary>
        /// 开关(value:0-关/1-开)
        /// </summary>
        public const string on_off = "on_off";
        /// <summary>
        /// 音量增加(Value默认”“)
        /// </summary>
        public const string volume_add = "volume+";
        /// <summary>
        /// 音量减少(Value默认”“)
        /// </summary>
        public const string volume_subtract = "volume-";
        /// <summary>
        /// 静音(value:0-取消静音,1-静音)
        /// </summary>
        public const string mute = "mute";
        /// <summary>
        /// 操作菜单(value:0-上;1-下;2-左;3-右;4-确定;5-返回;11-菜单项;)
        /// </summary>
        public const string operation = "operation";
        /// <summary>
        /// 播放(Value默认”“)
        /// </summary>
        public const string media_play = "media_play";
        /// <summary>
        /// 暂停(Value默认”“)
        /// </summary>
        public const string media_pause = "media_pause";
        /// <summary>
        /// 快进(Value默认”“)
        /// </summary>
        public const string fast_forward = "fast_forward";
        /// <summary>
        /// 快退(Value默认”“)
        /// </summary>
        public const string fast_back = "fast_back";
        /// <summary>
        /// 首页(Value默认”“)
        /// </summary>
        public const string home_page = "home_page";
        /// <summary>
        /// 信号源(Value:0-LiveTV;2-PS;3-HDMI_1;4-HDMI_2;5-HDMI_3;6-HDMI_4;11-AV;)
        /// </summary>
        public const string signal = "signal";
        /// <summary>
        /// 系统设置(Value默认”“)
        /// </summary>
        public const string system_setting = "system_setting";
    }
}
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
@@ -15,7 +15,7 @@
    {
        #region ■ 变量声明___________________________
        #region   -------变量声明---------
        /// <summary>
        /// 设备
        /// </summary>
@@ -160,47 +160,129 @@
                btnOpenCollectIcon.IsSelected = this.device.collect = !btnOpenCollectIcon.IsSelected;
                this.device.CollectFunction();
            };
            //首页
            shouyeFL.SetClickListener((fl, btnImage, btnText) => { });
            shouyeFL.SetClickListener((fl, btnImage, btnText) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.home_page, "");
            });
            //关机
            kaiguanFL.SetClickListener((fl, btnImage, btnText) =>
            {
                vv.Visible = false;
                baseCloseFFL.Visible = true;
                ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "0", (isBool) =>
                {
                    if (isBool)
                    {
                        CommonMethod.Current.MainThread(() =>
                        {
                            vv.Visible = false;
                            baseCloseFFL.Visible = true;
                        });
                    }
                    else
                    {
                        //提示:关机失败;
                    }
                });
            });
            //菜单
            caidanFL.SetClickListener((fl, btnImage, btnText) => { });
            caidanFL.SetClickListener((fl, btnImage, btnText) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "11");
            });
            //音量+
            btn_jia.MouseDownEventHandler += (sender, e) => { };
            btn_jia.MouseDownEventHandler += (sender, e) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.volume_add, "");
            };
            //音量-
            btn_jian.MouseDownEventHandler += (sender, e) => { };
            btn_jian.MouseDownEventHandler += (sender, e) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.volume_subtract, "");
            };
            //播放
            bofangBtn.SetClickListener((btn) => { });
            bofangBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.media_play, "");
            });
            //暂停
            zantingBtn.SetClickListener((btn) => { });
            zantingBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.media_pause, "");
            });
            //快进
            kuaijinBtn.SetClickListener((btn) => { });
            kuaijinBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.fast_forward, "");
            });
            //快退
            kauituiBtn.SetClickListener((btn) => { });
            kauituiBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.fast_back, "");
            });
            //静音
            jingyinBtn.SetClickListener((btn) => { });
            jingyinBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.mute, "1");
            });
            //设置
            shezhiBtn.SetClickListener((btn) => { });
            shezhiBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.system_setting, "");
            });
            //解除静音
            jiechujingyinBtn.SetClickListener((btn) => { });
            jiechujingyinBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.mute, "0");
            });
            //返回
            fanhuiBtn.SetClickListener((btn) => { });
            //控制菜单
            fanhuiBtn.SetClickListener((btn) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "5");
            });
            //上
            muenFrameLayout.SetTopClickListener((muen) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "0");
            });
            //下
            muenFrameLayout.SetBottomClickListener((muen) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "1");
            });
            //左
            muenFrameLayout.SetLeftClickListener((muen) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "2");
            });
            //右
            muenFrameLayout.SetRightClickListener((muen) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "3");
            });
            //OK
            muenFrameLayout.SetOkClickListener((muen) =>
            {
                ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "4");
            });
            //信号源
            sourceFrameLayout.selectAction += (text) =>
            {
                string value = text.Replace(" ", "_");
                ControlCommand(HisenseTVFunctionalAttributeConstant.signal, value);
            };
@@ -213,10 +295,40 @@
            //开机
            clickBtn.MouseDownEventHandler += (sen, e) =>
            {
                vv.Visible = true;
                baseCloseFFL.Visible = false;
                ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "1", (isBool) =>
                {
                    if (isBool)
                    {
                        CommonMethod.Current.MainThread(() =>
                        {
                            vv.Visible = true;
                            baseCloseFFL.Visible = false;
                        });
                    }
                    else
                    {
                        //提示:开机失败;
                    }
                });
            };
        }
        /// <summary>
        /// 发送控制属性指令
        /// </summary>
        /// <param name="key">功能属性(语雀上定义的)</param>
        /// <param name="value">值</param>
        /// <param name="action">结果回调(默认不回调)</param>
        private void ControlCommand(string key, string value, Action<bool> action = null)
        {
            try
            {
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(key, value);
                Send.Current.SendControlCommand(this.device, dic, action);
            }
            catch { }
        }
        /// <summary>
        /// 初始数据
@@ -242,6 +354,8 @@
                }
            });
        }
        #region   -------界面布局---------
        /// <summary>
        /// 初始化【开机】界面
        /// </summary>
@@ -316,7 +430,7 @@
            shouyeFL.AddImageView();
            shouyeFL.AddTextButtonView();
            shouyeFL.GetImageButton().UnSelectedImagePath = "HisenseTv/shouye.png";
            shouyeFL.GetTextButton().Text = "首页";
            shouyeFL.GetTextButton().TextID = StringId.shouye;
            kaiguanFL = new CustomFrameLayout();
@@ -326,7 +440,7 @@
            kaiguanFL.AddImageView();
            kaiguanFL.AddTextButtonView();
            kaiguanFL.GetImageButton().UnSelectedImagePath = "HisenseTv/kaiguan.png";
            kaiguanFL.GetTextButton().Text = "关机";
            kaiguanFL.GetTextButton().TextID = StringId.guanji;
            caidanFL = new CustomFrameLayout();
            backgroundOpenFl.AddChidren(caidanFL);
@@ -335,7 +449,7 @@
            caidanFL.AddImageView();
            caidanFL.AddTextButtonView();
            caidanFL.GetImageButton().UnSelectedImagePath = "HisenseTv/caidan.png";
            caidanFL.GetTextButton().Text = "菜单";
            caidanFL.GetTextButton().TextID = StringId.caidan;
            var yinliangFL = new FrameLayout();
            backgroundOpenFl.AddChidren(yinliangFL);
@@ -360,7 +474,8 @@
            {
                Y = Application.GetRealHeight(90),
                Height = Application.GetRealHeight(20),
                Text = "音量",
                //Text = "音量",
                TextID = StringId.yinliang,
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text14,
                Gravity = Gravity.CenterHorizontal,
@@ -389,28 +504,28 @@
            };
            bofangBtn = new CustomButton();
            bofangBtn.Text = "播放";
            bofangBtn.TextID = StringId.bofang;
            bofangBtn.Y = shouyeFL.Bottom + Application.GetRealHeight(24);
            bofangBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(bofangBtn);
            zantingBtn = new CustomButton();
            zantingBtn.Text = "暂停";
            zantingBtn.TextID = StringId.zanting;
            zantingBtn.Y = shouyeFL.Bottom + Application.GetRealHeight(24);
            zantingBtn.X = bofangBtn.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(zantingBtn);
            kuaijinBtn = new CustomButton();
            kuaijinBtn.Text = "快进";
            kuaijinBtn.TextID = StringId.kuaijin;
            kuaijinBtn.Y = bofangBtn.Bottom + Application.GetRealHeight(16);
            kuaijinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(kuaijinBtn);
            kauituiBtn = new CustomButton();
            kauituiBtn.Text = "快退";
            kauituiBtn.TextID = StringId.kuaitui;
            kauituiBtn.Y = bofangBtn.Bottom + Application.GetRealHeight(16);
            kauituiBtn.X = kuaijinBtn.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(kauituiBtn);
@@ -419,14 +534,14 @@
            jingyinBtn = new CustomButton();
            jingyinBtn.Text = "静音";
            jingyinBtn.TextID = StringId.jingyin;
            jingyinBtn.Y = kuaijinBtn.Bottom + Application.GetRealHeight(16);
            jingyinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(jingyinBtn);
            shezhiBtn = new CustomButton();
            shezhiBtn.Text = "设置";
            shezhiBtn.TextID = StringId.shezhi;
            shezhiBtn.Y = kuaijinBtn.Bottom + Application.GetRealHeight(16);
            shezhiBtn.X = jingyinBtn.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(shezhiBtn);
@@ -434,14 +549,14 @@
            jiechujingyinBtn = new CustomButton();
            jiechujingyinBtn.Text = "解除静音";
            jiechujingyinBtn.TextID = StringId.jiechujingyin;
            jiechujingyinBtn.Y = jingyinBtn.Bottom + Application.GetRealHeight(16);
            jiechujingyinBtn.X = yinliangFL.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(jiechujingyinBtn);
            fanhuiBtn = new CustomButton();
            fanhuiBtn.Text = "返回";
            fanhuiBtn.TextID = StringId.fanhui;
            fanhuiBtn.Y = jingyinBtn.Bottom + Application.GetRealHeight(16);
            fanhuiBtn.X = jiechujingyinBtn.Right + Application.GetRealWidth(37);
            backgroundOpenFl.AddChidren(fanhuiBtn);
@@ -566,7 +681,8 @@
                Height = Application.GetRealHeight(22),
                TextSize = TextSize.Text16,
                TextColor = MusicColor.TextColor,
                Text = "已关机",
                //Text = "已关机",
                TextID = StringId.yiguanji,
                TextAlignment = TextAlignment.Center,
                Gravity = Gravity.CenterHorizontal,
                Padding = new Padding(0, 16, 0, 16),
@@ -599,7 +715,7 @@
                Height = Application.GetRealHeight(16),
                TextSize = TextSize.Text12,
                TextColor = MusicColor.TextCancelColor,
                Text = "开机",
                TextID = StringId.kaiji,
                TextAlignment = TextAlignment.Center,
                Gravity = Gravity.CenterHorizontal,
                Padding = new Padding(0, 2, 0, 2),
@@ -618,7 +734,7 @@
        /// <summary>
        /// 初始化头部
        /// </summary>
        private void InitTopUI()
        private void InitTopUI()
        {
            this.BackgroundColor = MusicColor.ViewColor;
            this.topView = new TopView();
@@ -692,9 +808,11 @@
            }
            //this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20);
        }
    }
        #endregion
    }
    #region   -------自定义当前界面的容器---------
    /// <summary>
    /// 自定义(首页,关机,菜单)容器
    /// </summary>
@@ -1052,6 +1170,7 @@
                button.SetClickListener((btn) =>
                {
                    // MovieLibrary movieLibrary = new MovieLibrary();
                    selectAction?.Invoke(button.Text);
                });
                //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i)
@@ -1065,7 +1184,7 @@
        {
            return new List<string>
            {
                "HDML 1",
                "HDML 1",//" "
                "HDML 2",
                "HDML 3",
                "HDML 4",
@@ -1078,6 +1197,6 @@
    }
    #endregion
}
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -48,6 +48,22 @@
            return true;
        }
        /// <summary>
        /// 发送控制命令
        /// </summary>
        /// <param name="function">当前设备</param>
        /// <param name="dic">发送控制数据</param>
        public void SendControlCommand(Function function, Dictionary<string, string> dic,Action<bool> action)
        {
            new System.Threading.Thread(() =>
            {
                var result = DriverLayer.Control.Ins.SendWriteCommand(function, dic, false, 0);
                action?.Invoke(result);
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        ///请求服务器(与住宅有关:例如;homeId)