From e6156ab41aea16796798eb32fd7ce664345a8220 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期日, 23 一月 2022 11:33:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wjc' into release0123

---
 HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs |   81 ++++++++++++++++++++++++----------------
 1 files changed, 48 insertions(+), 33 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
index 90a7991..39f941d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
+++ b/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

--
Gitblit v1.8.0