| | |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | if (updateSelectedMusicThread != null || updateSelectedMusicThread.IsAlive) |
| | | if (updateSelectedMusicThread != null) |
| | | { |
| | | updateSelectedMusicThread.Abort(); |
| | | try |
| | | { |
| | | if (updateSelectedMusicThread.IsAlive) |
| | | { |
| | | updateSelectedMusicThread.Abort(); |
| | | ///关闭线程 |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | this.RemoveFromParent(); |
| | | }; |
| | |
| | | //防止歌手名字为空抛异常 |
| | | 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); |
| | | //列表当前播放音乐图标 |
| | |
| | | { |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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; |