wxr
2022-10-13 3eb7e4359ed28bef37359fe64a1726274874ba08
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -503,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 点击事件
                        ///提示语音点击事件
@@ -549,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
@@ -622,13 +640,32 @@
                                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;
                    }
                    outputDevice.status = dicSateteList;