wjc
2022-01-18 e7c4740cb2e4dec599a99c8823af5839acef084c
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