wjc
2022-10-13 fba3a6c55c4de790eaeee55f9897d668bb36dbb8
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -68,7 +68,6 @@
                        lightSwitchView.btnText.TextID = StringId.switchLogic;
                        fLayout.AddChidren(lightSwitchView.FLayoutView());
                        ///设备延时iewv
                        DelayView(fLayout, lightSwitchView.frameLayout.Bottom);
                        #endregion
@@ -102,7 +101,7 @@
                        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
@@ -504,9 +503,14 @@
                        LogicView.FunTypeView funTypeView = new LogicView.FunTypeView();
                        funTypeView.btnText.TextID = StringId.tishiyin;
                        fLayout.AddChidren(funTypeView.FLayoutView());
                        ///音量
                        LogicView.FunTypeView volView = new LogicView.FunTypeView();
                        volView.frameLayout.Y = funTypeView.frameLayout.Bottom;
                        volView.btnText.TextID = StringId.volumeMusic;
                        fLayout.AddChidren(volView.FLayoutView());
                        ///设备延时iewv
                        DelayView(fLayout, funTypeView.frameLayout.Bottom);
                        DelayView(fLayout, volView.frameLayout.Bottom);
                        #endregion
                        #region 点击事件
                        ///提示语音点击事件
@@ -522,7 +526,7 @@
                                {
                                    //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device);
                                    //var palyListName = Music.SendMethod.mMethod.GetListName(device); 
                                    var palyList= Music.SendMethod.mMethod.GetListMusic(device, "hdl_special");
                                    var palyList= Music.SendMethod.Current.GetListMusic(device, "hdl_special");
                                    List<string> musicNameList = new List<string>();
                                    for (int i = 0; i < palyList.songs.Count; i++)
                                    {
@@ -550,11 +554,24 @@
                            });
                        };
                        ///音量点击事件
                        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);
                        };
                        if (edit)
                        {
                            //显示编辑之前的设备状态
                            GetEditDeviceState(device, index, funTypeView.btnState, null, null, null);
                            GetEditDeviceState(device, index, funTypeView.btnState, volView.btnState, null, null);
                        }
                        #endregion
@@ -623,10 +640,29 @@
                                if (!_bool)
                                {
                                    //没有开关就默认添加-开-属性
                                    Dictionary<string, string> diction = new Dictionary<string, string>();
                                    diction.Add("key", "on_off");
                                    diction.Add("value", "on");
                                    Dictionary<string, string> diction = new Dictionary<string, string>
                                    {
                                        { "key", "on_off" },
                                        { "value", "on" }
                                    };
                                    dicSateteList.Add(diction);
                                }
                            }
                            break;
                        //音乐
                        case SPK.MusicStandard:
                        case SPK.AvMusic:
                            {
                                string volume = "volume";
                                var dicObj = dicSateteList.Find((dic) => dic.ContainsValue(volume));
                                if (dicObj != null)
                                {
                                    //有配置音乐音量属性,要重新排列,音量在前面
                                    var dicList = new List<Dictionary<string, string>>();
                                    dicList.Add(dicObj);//先添加音量属性
                                    var diclist = dicSateteList.FindAll((dic) => !dic.ContainsValue(volume));
                                    dicList.AddRange(diclist);//再添加其它属性
                                    dicSateteList = dicList;//重新赋值
                                }
                            }
                            break;
@@ -742,9 +778,8 @@
        /// <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 界面