wjc
2022-01-18 e7c4740cb2e4dec599a99c8823af5839acef084c
2021-1-18-01

更新了
12个文件已修改
145 ■■■■■ 已修改文件
HDL_ON/Common/ApiUtlis.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs
@@ -171,11 +171,11 @@
                            for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                            {
                                var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                {
                                    i++;
                                    continue;
                                }
                                //if (SPK.MusicSpkList().Contains(localFunction.spk))
                                //{
                                //    i++;
                                //    continue;
                                //}
                                var newFunction = deviceList.list.Find((obj) => obj.deviceId == localFunction.deviceId);
                                if (delFile == localFunction.savePath)
HDL_ON/DAL/DriverLayer/Control.cs
@@ -972,7 +972,6 @@
                        var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
                        if (localFunction == null)
                        {
                            Console.WriteLine("找不到音乐播放器添=======" + revString);
                            continue;
                        }
                        if (Ins.GatewayOnline_Local && isCloudData)//本地链接,除了涂鸦设备数据之外的云端数据不处理
@@ -999,7 +998,6 @@
                        {
                            localFunction.time_stamp = temp.time_stamp;
                            localFunction.SetAttrState(attr.key, attr.value);
                            Console.WriteLine("音乐播放器添加缓存数据=======" + revString);
                        }
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -26,6 +26,10 @@
        /// </summary>
        public string sid = "";
        /// <summary>
        /// 是否允许删除(false=可以删除)
        /// </summary>
        public bool tag = false;
        /// <summary>
        /// 逻辑名称
        /// </summary>
        public string name = "自动化";
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs
@@ -81,6 +81,19 @@
        };
        /// <summary>
        /// 显示是否删除标志
        /// </summary>
        public Button btnIsDelTag = new Button
        {
            Width = Application.GetRealWidth(10),
            Height = Application.GetRealWidth(10),
            Y = Application.GetRealHeight(12),
            X = Application.GetRealWidth(295 + 36 - 10),
            Radius = (uint)Application.GetRealHeight(5),
            BackgroundColor = 0xFFFF0000,
            Visible = false,
        };
        /// <summary>
        /// 点击事件
        /// </summary>
        public Button btnclick= new Button
@@ -101,6 +114,7 @@
            frameLayout.AddChidren(btnLienIcon);
            frameLayout.AddChidren(btnclick);
            frameLayout.AddChidren(btnSwitchIcon);
            frameLayout.AddChidren(btnIsDelTag);
            return frameLayout;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -81,6 +81,8 @@
                    })
                    { IsBackground = true }.Start();
                };
                GetSelectIcon(logicView.frameLayout, currLogic);
                if (i == 0)//降序排列
                //if (Logic.LogicList.Count - 1 == i)
@@ -95,6 +97,15 @@
                else
                {
                    logicView.btnSwitchIcon.IsSelected = false;
                }
                ///显示特殊自动化标志
                if (currLogic.tag == true)
                {
                    logicView.btnIsDelTag.Visible = true;
                }
                else
                {
                    logicView.btnIsDelTag.Visible = false;
                }
            }
@@ -288,6 +299,7 @@
                        {
                            Logic newlogic = new Logic();
                            newlogic.tag = logic.tag;
                            newlogic.name = logic.name;
                            newlogic.userLogicId = logic.userLogicId;
                            newlogic.sid = logic.sid;
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -163,6 +163,7 @@
        var logicIfon = new JObject { };
        logicIfon.Add("sid", logic.sid);
        logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
        logicIfon.Add("tag", logic.tag);
        logicIfon.Add("name", logic.name);
        logicIfon.Add("relation", logic.relation);
        logicIfon.Add("enable", logic.enable);
@@ -287,6 +288,7 @@
        logicIfon.Add("userLogicId", logic.userLogicId);
        logicIfon.Add("sid", logic.sid);
        logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
        logicIfon.Add("tag", logic.tag);
        logicIfon.Add("name", logic.name);
        logicIfon.Add("relation", logic.relation);
        logicIfon.Add("enable", logic.enable);
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -81,7 +81,11 @@
                BackgroundColor = CSS.CSS_Color.view,
                Gravity = Gravity.BottomCenter,//置底的属性
            };
            this.AddChidren(frameLayout);
            ///可以显示删除控件
            if (Logic.currlogic.tag == false)
            {
                this.AddChidren(frameLayout);
            }
            Button btnDel = new Button
            {
                TextSize = LogicView.TextSize.text16,
@@ -94,6 +98,7 @@
            frameLayout.AddChidren(btnDel);
            EventHandler<MouseEventArgs> delClick = (sender, e) =>
            {
                Loading loading = new Loading();
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -70,7 +70,8 @@
            ///加载播放音乐界面的控件方法
            playView.viewFrameLayout(middLayout);
            #endregion
            #region   ---控件的点击事件---
            #region   ---界面点击事件---
            //收藏图标事件
            playView.collectIconBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -98,7 +99,6 @@
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                         msg += Language.StringByID(StringId.singleMode);
                         break;
                     case ValueProperty.single_cycle:
                         modeValueString =ValueProperty.random;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
@@ -154,8 +154,34 @@
                ///下拉刷新
                myListView.verticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
                {
                    System.Threading.Tasks.Task.Run(() =>
                    {
                        try
                        {
                            A31MusicModel.Current.palyLists.Clear();
                            if (A31MusicModel.Current.palyLists.Count == 0)
                            {
                                SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                            }
                        }
                        catch
                        {
                        }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                myListView.verticalScrolViewLayout.EndHeaderRefreshing();
                                myListView.verticalScrolViewLayout.RemoveAll();
                                var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name);
                                var musicList = A31MusicModel.Current.GetSongList(listName);
                                A31SongPlay.SongListView(myListView.verticalScrolViewLayout, musicList, listName, myListView.popFra);
                            });
                        }
                    });
                    //结束刷新
                    myListView.verticalScrolViewLayout.EndHeaderRefreshing();
                };
                ///移除界面
                EventHandler<MouseEventArgs> removeFromParentView = (sen, e1) =>
@@ -243,25 +269,23 @@
            {
                playView.nextBtn.IsSelected = false;
            };
            ///物理按键的点击事件
            Volume.VolumeChange = (volume) =>
            {
                if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
                {
                    return;
                }
                playView.volSeekBar.Progress = volume;
                if (startVolume != volume)
                {
                    startVolume = volume;
                    A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    dic.Add(KeyProperty.volume, startVolume.ToString());
                    SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                }
            };
            /////物理按键的点击事件
            //Volume.VolumeChange = (volume) =>
            //{
            //    if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
            //    {
            //        return;
            //    }
            //    playView.volSeekBar.Progress = volume;
            //    if (startVolume != volume)
            //    {
            //        startVolume = volume;
            //        A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
            //        Dictionary<string, string> dic = new Dictionary<string, string>();
            //        dic.Add(KeyProperty.volume, startVolume.ToString());
            //        SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
            //    }
            //};
            #endregion
        }
        /// <summary>
@@ -283,7 +307,7 @@
                        {
                            //更新总时间                            
                            //总共有多少秒
                            int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time))/1000;
                            int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time));
                            //分钟
                            int totalMusicMinute = totalSecond / 60;
                            //秒钟
@@ -448,16 +472,7 @@
            switch (A31MusicModel.Current.functionMusic.GetAttrState("source"))
            {
                case "QPLAY"://QQ音乐
                    playView.loveBtn.Alpha = 0.5f;
                    playView.loveBtn.Enable = false;
                    break;
                case "AIRPLAY"://酷狗音乐
                    playView.loveBtn.Alpha = 0.5f;
                    playView.loveBtn.Enable = false;
                    playView.diyArcSeekBar.IsClickable = false;
                    break;
                //sdcard/audio_in/ftp/radio/bluetooth
                case "SONGLIST-NETWORK"://本地音乐
                    break;
                case "SONGLIST-LOCAL"://USB
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -102,9 +102,10 @@
            verticalRefresh.BeginHeaderRefreshingAction += () =>
            {
                verticalRefresh.EndHeaderRefreshing();
                ////发送读取音乐播放器状态线程
                SeachMusic();
                verticalRefresh.EndHeaderRefreshing();
            };
            this.AddChidren(loading);
            SeachMusic();
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -57,7 +57,7 @@
        {
            try
            {
               // RefreshDeviceStatus(functionIds);
                //RefreshDeviceStatus(functionIds);
                a31Music.LastDateTime = DateTime.Now;
                ///从缓存里面查找音乐播放器对象<缓存数据收到推送过来的状态会更新缓存数据>
                var allLocalFuntion = FunctionList.List.GetDeviceFunctionList();
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
@@ -95,17 +95,17 @@
            switch (mode)
            {
                //0列表循环,1单曲循环,2随机播放;
                case "list_cycle":
                case ValueProperty.list_cycle:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/list.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.listMode);
                    break;
                case "single_cycle/order":
                case ValueProperty.single_cycle:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.singleMode);
                    break;
                case "random":
                case ValueProperty.random:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/random.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.randomMode);
                    break;
HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
@@ -285,7 +285,7 @@
            musicBjFl.AddChidren(songNameTextView);
            musicBjFl.AddChidren(singerBtn);
            musicBjFl.AddChidren(playOrderBtn);
            musicBjFl.AddChidren(loveBtn);
            //musicBjFl.AddChidren(loveBtn);
            musicBjFl.AddChidren(playlistBtn);
            musicBjFl.AddChidren(volIconBtn);
            musicBjFl.AddChidren(volSeekBar);