From 7167334c0e89dd84827d59e726123d14776e3a09 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 16 六月 2020 11:14:13 +0800
Subject: [PATCH] 2020-06-16-1

---
 HDL_ON/UI/Music/A31MyListMusic.cs |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/Music/A31MyListMusic.cs b/HDL_ON/UI/Music/A31MyListMusic.cs
index 302f73e..4a58f1d 100644
--- a/HDL_ON/UI/Music/A31MyListMusic.cs
+++ b/HDL_ON/UI/Music/A31MyListMusic.cs
@@ -26,9 +26,17 @@
             topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
             {
 
-                if (updateSelectedMusicThread != null || updateSelectedMusicThread.IsAlive)
+                if (updateSelectedMusicThread != null)
                 {
-                    updateSelectedMusicThread.Abort();
+                    try
+                    {
+                        if (updateSelectedMusicThread.IsAlive)
+                        {
+                            updateSelectedMusicThread.Abort();
+                            ///鍏抽棴绾跨▼
+                        }
+                    }
+                    catch { }
                 }
                 this.RemoveFromParent();
             };
@@ -65,10 +73,12 @@
                     //闃叉姝屾墜鍚嶅瓧涓虹┖鎶涘紓甯�
                     songs.Artist = " ";
                 }
-                FrameLayout musicViewFl = new FrameLayout
+                RowLayout musicViewFl = new RowLayout
                 {
                     Width = Application.GetRealWidth(375),
                     Height = Application.GetRealHeight(44),
+                    LineColor = Color.WhiteColor,
+                    SubViewWidth = Application.GetRealWidth(90),//鏀瑰彉缂栬緫鎺т欢瀹藉害澶氬皯锛�
                 };
                 middViewLayout.AddChidren(musicViewFl);
                 //鍒楄〃褰撳墠鎾斁闊充箰鍥炬爣
@@ -177,7 +187,21 @@
                 {
                     loveIcon.IsSelected = false;
                 }
-
+                ///鍒犻櫎鎺т欢
+                var delBtn = new Button
+                {
+                    BackgroundColor = Color.MusicDelColor,
+                    Text = Language.StringByID(StringId.delMusic),
+                    TextColor = Color.WhiteColor,
+                    TextSize = TextSize.Text16,
+                };
+                musicViewFl.AddRightView(delBtn);
+                delBtn.MouseUpEventHandler += (sender, e) =>
+                {
+                    fileListInfo.MusicInfoList.Remove(songs);
+                    A31MusicModel.Save();
+                    musicViewFl.RemoveFromParent();
+                };
                 //娣诲姞鍒版垜鐨勫垪琛�
                 Button addIcon = new Button
                 {
@@ -241,10 +265,10 @@
                         {
                             for (int i = 0; i < middViewLayout.ChildrenCount; i++)
                             {
-                                FrameLayout view = (FrameLayout)middViewLayout.GetChildren(i);
-                                var volIconBtn = (Button)view.GetChildren(0);//鐩存帴FrameLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
-                                var songNameBtn = (Button)view.GetChildren(1);//鐩存帴FrameLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
-                                var artistNameBtn = (Button)view.GetChildren(2);//鐩存帴FrameLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
+                                RowLayout view = (RowLayout)middViewLayout.GetChildren(i);
+                                var volIconBtn = (Button)view.GetChildren(0);//鐩存帴RowLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
+                                var songNameBtn = (Button)view.GetChildren(1);//鐩存帴RowLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
+                                var artistNameBtn = (Button)view.GetChildren(2);//鐩存帴RowLayout鐖舵帶浠舵壘鍒拌鎺т欢Button
                                 if (A31MusicModel.Current.A31PlayStatus.TrackURL == songNameBtn.Tag.ToString())
                                 {
                                     volIconBtn.Visible = true;
@@ -363,7 +387,7 @@
 
                 sb.AppendLine("&amp;lt;dc:title&amp;gt;" + tempMusicInfo.Title + "&amp;lt;/dc:title&amp;gt;");
                 sb.AppendLine("&amp;lt;dc:creator&amp;gt;DJ Sanny J&amp;lt;/dc:creator&amp;gt;");
-                sb.AppendLine("&amp;lt;upnp:artist&amp;gt;" + tempMusicInfo.Artist + "&amp;lt;/upnp:artist&amp;gt;");
+                sb.AppendLine("&amp;lt;upnp:artist&amp;gt;" + listName + "&amp;lt;/upnp:artist&amp;gt;");
                 sb.AppendLine("&amp;lt;upnp:album&amp;gt;" + tempMusicInfo.Album + "&amp;lt;/upnp:album&amp;gt;");
                 sb.AppendLine("&amp;lt;upnp:albumArtURI&amp;gt;unknown&amp;lt;/upnp:albumArtURI&amp;gt;");
                 sb.AppendLine("&amp;lt;/item&amp;gt;");

--
Gitblit v1.8.0