From a499dceb02f181e64956431ed0c682dd7d2ce7d7 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 04 八月 2020 17:45:20 +0800
Subject: [PATCH] 2020-08-04-1

---
 HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs |   68 ++--------------------------------
 1 files changed, 4 insertions(+), 64 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs
index b399c33..89c9543 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31LocalMusicList.cs
@@ -17,7 +17,7 @@
         public void Show()
         {
             #region   鐣岄潰甯冨眬------
-            this.BackgroundColor = Color.ViewColor;
+            this.BackgroundColor = MusicColor.ViewColor;
             var topView = new TopView();
             this.AddChidren(topView.TopFLayoutView());
             topView.topNameBtn.TextID = StringId.localMusic;
@@ -27,13 +27,14 @@
             };
              middViewLayout = new VerticalRefreshLayout
             {
-                BackgroundColor = Color.WhiteColor,
+                BackgroundColor = MusicColor.WhiteColor,
                 Y = topView.fLayout.Bottom,
                 Height = Application.GetRealHeight(H_W.H - H_W.T_Height),
             };
             this.AddChidren(middViewLayout);
             middViewLayout.BeginHeaderRefreshingAction += () =>
             {
+                MusicView();
                 middViewLayout.EndHeaderRefreshing();
             };
             #endregion
@@ -45,68 +46,7 @@
         public void MusicView()
         {
             middViewLayout.RemoveAll();
-            for (int i = 0; i < MusicInfo.MusicInfoList.Count; i++)
-            {
-                var songs = MusicInfo.MusicInfoList[i];
-                if (songs == null)
-                {
-                    continue;
-                }
-                songs.URL = "http://" + new Shared.Net.NetWiFi().IpAddress + ":" + com.hdl.on.Server.Port + "/" + songs.ID;
-                View.SongView songView = new View.SongView();
-                songView.SongFrameLayout(middViewLayout,songs);
-                //娣诲姞鍠滅埍闊充箰鎺т欢
-                songView.loveIcon.MouseUpEventHandler += (sender, e) =>
-                {
-                    songView.loveIcon.IsSelected = !songView.loveIcon.IsSelected;
-                    if (songView.loveIcon.IsSelected)
-                    {
-                        ///鏌ユ壘闊充箰鏄惁瀛樺湪鍦ㄥ垪琛�
-                        var music1 = A31MusicModel.Current.LoveMusicInfoList.Find((m) => m.URL == songs.URL);
-                        if (music1 == null)
-                        {
-                            ///娌℃湁瀛樺湪灏辨坊鍔�
-                            A31MusicModel.Current.LoveMusicInfoList.Add(songs);
-                        }
-                    }
-                    else
-                    {
-                        ///鏌ユ壘闊充箰鏄惁瀛樺湪鍦ㄥ垪琛�
-                        var music1 = A31MusicModel.Current.LoveMusicInfoList.Find((m) => m.URL == songs.URL);
-                        if (music1 != null)
-                        {
-                            ///瀛樺湪灏卞垹闄�
-                            A31MusicModel.Current.LoveMusicInfoList.Remove(songs);
-                        }
-
-                    }
-                    A31MusicModel.Save();
-                };
-                //娣诲姞鍒版垜鐨勫垪琛�
-                songView.addIcon.MouseUpEventHandler = (sender, e) =>
-                {
-                    new View.DialogView { }.FieListView(songs);
-                };
-                ///鐐瑰嚮鎾斁浜嬩欢
-                songView.clickBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    System.Threading.Tasks.Task.Run(() =>
-                    {
-                        System.Threading.Thread.Sleep(50);
-                        Application.RunOnMainThread(() =>
-                        {
-                            //绉婚櫎鐣岄潰
-                            A31MusicModel.Current.A31PlayStatus.Title = songView.songBtn.Text;
-                            MainPage.BasePageView.RemoveViewByTag("Music");
-                            System.Threading.Tasks.Task.Run(() =>
-                            {
-                               SendMethod.PushList(songs, Language.StringByID(StringId.localMusic), MusicInfo.MusicInfoList,A31MusicModel.Current);
-                            });
-                        });
-                    });
-                };
-
-            }
+            UI2.FuntionControlView.Music.UpdateThread.playMusuc(middViewLayout, "鏈湴闊充箰", Language.StringByID(StringId.localMusic), MusicInfo.MusicInfoList, A31MusicModel.Current);
         }
         /// <summary>
         /// 瀹氭椂鏇存柊褰撳墠鎾斁闊充箰

--
Gitblit v1.8.0