陈嘉乐
2020-06-16 7167334c0e89dd84827d59e726123d14776e3a09
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;");