From f9181a9c8125136f597add7c30cb2ff508d54ba7 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 25 七月 2024 17:34:32 +0800
Subject: [PATCH] 2024年07月25日17:33:40

---
 HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs |  336 +++++++++++++++++++++--------------------
 HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs      |   62 ++++---
 HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs        |   64 ++++---
 NunitTest-Android/Resources/Resource.designer.cs           |    2 
 4 files changed, 240 insertions(+), 224 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
index 7a30610..477877c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -349,182 +349,186 @@
         {
             timerThread = new System.Threading.Thread((obj) =>
             {
-                while (true)
+                try
                 {
-                    Application.RunOnMainThread(() =>
+                    while (true)
                     {
-                        try
+                        Application.RunOnMainThread(() =>
                         {
-                            //鏇存柊鎬绘椂闂�                            
-                            //鎬诲叡鏈夊灏戠
-                            int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time));
-                            //鍒嗛挓
-                            int totalMusicMinute = totalSecond / 60;
-                            //绉掗挓
-                            int totalMusicSecond = totalSecond % 60;
-                            //杞寲姝屾洸鎬绘椂闂存椂闂存牸寮�
-                            string totalTime = (totalMusicMinute.ToString().Length < 2 ? "0" + totalMusicMinute.ToString() : totalMusicMinute.ToString()) + ":" + (totalMusicSecond.ToString().Length < 2 ? "0" + totalMusicSecond.ToString() : totalMusicSecond.ToString());
-                            //鏄剧ず鎬绘椂闂�
-                            playView.endTimeBtn.Text = totalTime;
-                            //鏄剧ず鎾斁鍣ㄥ悕绉�
-                            topView.topNameBtn.Text = A31MusicModel.Current.functionMusic.name;
-                            //鏄剧ず鎾斁妯″紡鍥炬爣
-                            switch (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode))
+                            try
                             {
-                                case ValueProperty.list_cycle://鍒楄〃寰幆
-                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
-                                    break;
-                                case ValueProperty.single_cycle://鍗曟洸寰幆
-                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single_cycle.png";
-                                    break;
-                                case ValueProperty.random://闅忔満鎾斁
-                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
-                                    break;
-                                case ValueProperty.single:// 鍗曟洸<single>
-                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
-                                    break;
-                                case ValueProperty.order://寰簭寰幆
-                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/order.png";
-                                    break;
-                            }
+                                //鏇存柊鎬绘椂闂�                            
+                                //鎬诲叡鏈夊灏戠
+                                int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time));
+                                //鍒嗛挓
+                                int totalMusicMinute = totalSecond / 60;
+                                //绉掗挓
+                                int totalMusicSecond = totalSecond % 60;
+                                //杞寲姝屾洸鎬绘椂闂存椂闂存牸寮�
+                                string totalTime = (totalMusicMinute.ToString().Length < 2 ? "0" + totalMusicMinute.ToString() : totalMusicMinute.ToString()) + ":" + (totalMusicSecond.ToString().Length < 2 ? "0" + totalMusicSecond.ToString() : totalMusicSecond.ToString());
+                                //鏄剧ず鎬绘椂闂�
+                                playView.endTimeBtn.Text = totalTime;
+                                //鏄剧ず鎾斁鍣ㄥ悕绉�
+                                topView.topNameBtn.Text = A31MusicModel.Current.functionMusic.name;
+                                //鏄剧ず鎾斁妯″紡鍥炬爣
+                                switch (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode))
+                                {
+                                    case ValueProperty.list_cycle://鍒楄〃寰幆
+                                        playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
+                                        break;
+                                    case ValueProperty.single_cycle://鍗曟洸寰幆
+                                        playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single_cycle.png";
+                                        break;
+                                    case ValueProperty.random://闅忔満鎾斁
+                                        playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
+                                        break;
+                                    case ValueProperty.single:// 鍗曟洸<single>
+                                        playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
+                                        break;
+                                    case ValueProperty.order://寰簭寰幆
+                                        playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/order.png";
+                                        break;
+                                }
 
 
-                            //if (A31MusicModel.Current.A31PlayStatus.Source == "RADIO-NETWORK")
-                            //{
-                            //    var v = A31MusicModel.Current.LoveRadioInfoList.Find((like) =>
-                            //    {
-                            //        return like.URL == A31MusicModel.Current.A31PlayStatus.TrackURL;
-                            //    });
-                            //    if (v != null)
-                            //    {
-                            //        playView.loveBtn.IsSelected = true;
-                            //    }
-                            //    else
-                            //    {
-                            //        playView.loveBtn.IsSelected = false;
-                            //    }
-                            //}
-                            //else
-                            //{
-                            //    var v = A31MusicModel.Current.LoveMusicInfoList.Find((like) =>
-                            //    {
-                            //        return like.URL == A31MusicModel.Current.A31PlayStatus.TrackURL;
-                            //    });
-                            //    if (v != null)
-                            //    {
-                            //        playView.loveBtn.IsSelected = true;
-                            //    }
-                            //    else
-                            //    {
-                            //        playView.loveBtn.IsSelected = false;
-                            //    }
-                            //}
-                            //鏄剧ず鎾斁鍣ㄥ尯鍩�
-                            playView.regionBtn.Text = A31MusicModel.Current.functionMusic.GetRoomListName();
-                            //鏄剧ず鎾斁鍣ㄦ敹钘忕姸鎬�
-                            if (A31MusicModel.Current.functionMusic.collect)
-                            {
-                                //鏀惰棌
-                                playView.collectIconBtn.IsSelected = true;
+                                //if (A31MusicModel.Current.A31PlayStatus.Source == "RADIO-NETWORK")
+                                //{
+                                //    var v = A31MusicModel.Current.LoveRadioInfoList.Find((like) =>
+                                //    {
+                                //        return like.URL == A31MusicModel.Current.A31PlayStatus.TrackURL;
+                                //    });
+                                //    if (v != null)
+                                //    {
+                                //        playView.loveBtn.IsSelected = true;
+                                //    }
+                                //    else
+                                //    {
+                                //        playView.loveBtn.IsSelected = false;
+                                //    }
+                                //}
+                                //else
+                                //{
+                                //    var v = A31MusicModel.Current.LoveMusicInfoList.Find((like) =>
+                                //    {
+                                //        return like.URL == A31MusicModel.Current.A31PlayStatus.TrackURL;
+                                //    });
+                                //    if (v != null)
+                                //    {
+                                //        playView.loveBtn.IsSelected = true;
+                                //    }
+                                //    else
+                                //    {
+                                //        playView.loveBtn.IsSelected = false;
+                                //    }
+                                //}
+                                //鏄剧ず鎾斁鍣ㄥ尯鍩�
+                                playView.regionBtn.Text = A31MusicModel.Current.functionMusic.GetRoomListName();
+                                //鏄剧ず鎾斁鍣ㄦ敹钘忕姸鎬�
+                                if (A31MusicModel.Current.functionMusic.collect)
+                                {
+                                    //鏀惰棌
+                                    playView.collectIconBtn.IsSelected = true;
+                                }
+                                else
+                                {
+                                    //涓嶆敹钘�
+                                    playView.collectIconBtn.IsSelected = false;
+                                }
+                                //if (A31MusicModel.Current.A31PlayStatus.IsMute)
+                                //{
+                                //   // btnMute.IsSelected = true;//闈欓煶鍥炬爣
+                                //    playView.volSeekBar.Progress = 0;
+                                //}
+                                //else
+                                //{
+                                //   // btnMute.IsSelected = false;//闈欓煶鍥炬爣
+                                //    if (1000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds)
+                                //    {
+                                //        //澹伴煶杩涘害鏉�;
+                                //        playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.A31PlayStatus.vol);
+                                //        //鏄剧ず褰撳墠闊抽噺鍊�;
+                                //        playView.volValueBtn.Text = A31MusicModel.Current.A31PlayStatus.vol + "%";
+                                //    }
+                                //}
+                                //涓轰簡闃叉闊抽噺鏉¤烦鍔�,寤堕暱鏇存柊鏃堕棿(澶氬姞1s)
+                                if (2000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds || A31MusicModel.ProgressDateTime == DateTime.MinValue)
+                                {
+                                    //鏄剧ず闊抽噺杩涘害鏉″��;
+                                    playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume));
+                                    //鏄剧ず褰撳墠闊抽噺鍊�;
+                                    playView.volValueBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume) + "%";
+                                }
+                                //鏇存柊鎾斁鍣ㄩ煶閲忕粰绯荤粺闊抽噺
+                                //Volume.MusicVolume = playView.volSeekBar.Progress;
+                                //褰撳墠鎾斁闊充箰鏃堕棿
+                                //鎸夐亾鐞嗕笉浼氫负绌猴紝GetAttrState("playing_time")鍊煎彲鑳戒负绌猴紝寮哄埗杞崲int.Parse(锛変細鍑虹幇寮傚父锛屼笉杩囦篃鍋氫簡寮傚父澶勭悊浜�
+                                int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time));
+                                //璇嗗埆闊充箰鐘舵�佹槸鍚﹀湪鎾斁鐘舵��
+                                if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
+                                {
+                                    //闊充箰鍦ㄦ挱鏀炬椂锛屽啀璁$畻鎾斁鏃堕棿(鐜板湪鏃堕棿=鍘熸潵鏃堕棿+1绉�)
+                                    //playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
+                                    playSecond += 1;//琛ㄧず鍔犱笂绛夊緟鐨勬椂闂�1s
+                                    ///姝屾洸璁板綍鏆傛椂鏃堕棿鍐欏叆缂撳瓨锛�
+                                    A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.playing_time, playSecond);
+                                }
+                                if (playSecond <= 0)
+                                {
+                                    ///鎾斁鏃堕棿涓嶈兘灏忎簬0锛�
+                                    playSecond = 0;
+                                }
+                                if (playSecond >= totalSecond)
+                                {
+                                    ///鎾斁鏃堕棿涓嶈兘瓒呰繃鎬绘椂闂达紱
+                                    playSecond = totalSecond;
+                                }
+                                int playMusicMinute = playSecond / 60;
+                                //绉掗挓
+                                int playMusicSecond = playSecond % 60;
+                                //杞寲鎾斁鏃堕棿鏃堕棿鏍煎紡
+                                string playTime = (playMusicMinute.ToString().Length < 2 ? "0" + playMusicMinute.ToString() : playMusicMinute.ToString()) + ":" + (playMusicSecond.ToString().Length < 2 ? "0" + playMusicSecond.ToString() : playMusicSecond.ToString());
+                                //鏄剧ず鎾斁鏃堕棿                  
+                                playView.startTimeBtn.Text = playTime;
+                                //鏄剧ず鎾斁鐘舵��
+                                if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
+                                {
+                                    //鎾斁
+                                    playView.playBtn.IsSelected = true;
+                                }
+                                else
+                                {
+                                    //鏆傚仠
+                                    playView.playBtn.IsSelected = false;
+                                    ///璁板綍姝屾洸鏆傚仠鏃堕棿锛�<LastDateTime 璁$畻鎾斁鏃堕棿鏈夌敤鍒�>
+                                    A31MusicModel.Current.LastDateTime = DateTime.Now;
+                                }
+                                //鏄剧ず杩涘害鏉″��
+                                if (totalSecond == 0)
+                                {
+                                    //姝屾洸鎾斁杩涘害
+                                    playView.diyArcSeekBar.Progress = 0;
+                                }
+                                else
+                                {
+                                    //姝屾洸鎾斁杩涘害
+                                    playView.diyArcSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1
+                                }
+                                //鏄剧ず姝屾洸鍚嶇О
+                                playView.songNameTextView.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
+                                //鏄剧ず姝屾墜鍚嶇О
+                                playView.singerBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
+                                //鏇存柊婧愮殑鐣岄潰
+                                // showSourcePage();
                             }
-                            else
+                            catch (Exception e)
                             {
-                                //涓嶆敹钘�
-                                playView.collectIconBtn.IsSelected = false;
+                                var ee = e.Message;
                             }
-                            //if (A31MusicModel.Current.A31PlayStatus.IsMute)
-                            //{
-                            //   // btnMute.IsSelected = true;//闈欓煶鍥炬爣
-                            //    playView.volSeekBar.Progress = 0;
-                            //}
-                            //else
-                            //{
-                            //   // btnMute.IsSelected = false;//闈欓煶鍥炬爣
-                            //    if (1000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds)
-                            //    {
-                            //        //澹伴煶杩涘害鏉�;
-                            //        playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.A31PlayStatus.vol);
-                            //        //鏄剧ず褰撳墠闊抽噺鍊�;
-                            //        playView.volValueBtn.Text = A31MusicModel.Current.A31PlayStatus.vol + "%";
-                            //    }
-                            //}
-                            //涓轰簡闃叉闊抽噺鏉¤烦鍔�,寤堕暱鏇存柊鏃堕棿(澶氬姞1s)
-                            if (2000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds || A31MusicModel.ProgressDateTime == DateTime.MinValue)
-                            {
-                                //鏄剧ず闊抽噺杩涘害鏉″��;
-                                playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume));
-                                //鏄剧ず褰撳墠闊抽噺鍊�;
-                                playView.volValueBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume) + "%";
-                            }
-                            //鏇存柊鎾斁鍣ㄩ煶閲忕粰绯荤粺闊抽噺
-                            //Volume.MusicVolume = playView.volSeekBar.Progress;
-                            //褰撳墠鎾斁闊充箰鏃堕棿
-                            //鎸夐亾鐞嗕笉浼氫负绌猴紝GetAttrState("playing_time")鍊煎彲鑳戒负绌猴紝寮哄埗杞崲int.Parse(锛変細鍑虹幇寮傚父锛屼笉杩囦篃鍋氫簡寮傚父澶勭悊浜�
-                            int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time));
-                            //璇嗗埆闊充箰鐘舵�佹槸鍚﹀湪鎾斁鐘舵��
-                            if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
-                            {
-                                //闊充箰鍦ㄦ挱鏀炬椂锛屽啀璁$畻鎾斁鏃堕棿(鐜板湪鏃堕棿=鍘熸潵鏃堕棿+1绉�)
-                                //playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
-                                playSecond += 1;//琛ㄧず鍔犱笂绛夊緟鐨勬椂闂�1s
-                                ///姝屾洸璁板綍鏆傛椂鏃堕棿鍐欏叆缂撳瓨锛�
-                                A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.playing_time, playSecond);
-                            }
-                            if (playSecond <= 0)
-                            {
-                                ///鎾斁鏃堕棿涓嶈兘灏忎簬0锛�
-                                playSecond = 0;
-                            }
-                            if (playSecond >= totalSecond)
-                            {
-                                ///鎾斁鏃堕棿涓嶈兘瓒呰繃鎬绘椂闂达紱
-                                playSecond = totalSecond;
-                            }
-                            int playMusicMinute = playSecond / 60;
-                            //绉掗挓
-                            int playMusicSecond = playSecond % 60;
-                            //杞寲鎾斁鏃堕棿鏃堕棿鏍煎紡
-                            string playTime = (playMusicMinute.ToString().Length < 2 ? "0" + playMusicMinute.ToString() : playMusicMinute.ToString()) + ":" + (playMusicSecond.ToString().Length < 2 ? "0" + playMusicSecond.ToString() : playMusicSecond.ToString());
-                            //鏄剧ず鎾斁鏃堕棿                  
-                            playView.startTimeBtn.Text = playTime;
-                            //鏄剧ず鎾斁鐘舵��
-                            if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
-                            {
-                                //鎾斁
-                                playView.playBtn.IsSelected = true;
-                            }
-                            else
-                            {
-                                //鏆傚仠
-                                playView.playBtn.IsSelected = false;
-                                ///璁板綍姝屾洸鏆傚仠鏃堕棿锛�<LastDateTime 璁$畻鎾斁鏃堕棿鏈夌敤鍒�>
-                                A31MusicModel.Current.LastDateTime = DateTime.Now;
-                            }
-                            //鏄剧ず杩涘害鏉″��
-                            if (totalSecond == 0)
-                            {
-                                //姝屾洸鎾斁杩涘害
-                                playView.diyArcSeekBar.Progress = 0;
-                            }
-                            else
-                            {
-                                //姝屾洸鎾斁杩涘害
-                                playView.diyArcSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1
-                            }
-                            //鏄剧ず姝屾洸鍚嶇О
-                            playView.songNameTextView.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
-                            //鏄剧ず姝屾墜鍚嶇О
-                            playView.singerBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
-                            //鏇存柊婧愮殑鐣岄潰
-                            // showSourcePage();
-                        }
-                        catch (Exception e)
-                        {
-                            var ee = e.Message;
-                        }
-                    });
-                    System.Threading.Thread.Sleep(1000 * 1);
+                        });
+                        System.Threading.Thread.Sleep(1000 * 1);
+                    }
                 }
+                catch (Exception e) { }
             })
             { IsBackground = true };
             timerThread.Start();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs
index 139f635..d3bc3b7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs
@@ -140,44 +140,48 @@
         {
             System.Threading.Thread updateSelectedMusicThread = new System.Threading.Thread(() =>
             {
-                while (frame.Parent != null)
+                try
                 {
-                    //A31MusicModel.LogMusic("宸插惎鍔ㄦ洿鏂伴煶涔愬垪琛ㄦ煇涓�鏉¢煶涔愮姸鎬佺殑绾跨▼");
-                    System.Threading.Thread.Sleep(1000);
-                    Application.RunOnMainThread(() =>
+                    while (frame.Parent != null)
                     {
-                        try
+                        //A31MusicModel.LogMusic("宸插惎鍔ㄦ洿鏂伴煶涔愬垪琛ㄦ煇涓�鏉¢煶涔愮姸鎬佺殑绾跨▼");
+                        System.Threading.Thread.Sleep(1000);
+                        Application.RunOnMainThread(() =>
                         {
-                            for (int i = 0; i < middViewLayout.ChildrenCount; i++)
+                            try
                             {
-                                RowLayout view = (RowLayout)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
-                                //if (a31MusicModel.A31PlayStatus.TrackURL == songNameBtn.Tag.ToString())
-                                //{
-                                //    volIconBtn.Visible = true;
-                                //    songNameBtn.TextColor = UI.Music.MusicColor.SelectedColor;
-                                //    songNameBtn.X = Application.GetRealWidth(48);
-                                //    artistNameBtn.X = songNameBtn.Right;
-                                //    artistNameBtn.TextColor = UI.Music.MusicColor.SelectedColor;
-                                //}
-                                //else
-                                //{
-                                //    volIconBtn.Visible = false;
-                                //    songNameBtn.TextColor = UI.Music.MusicColor.MusicTxet14Color;
-                                //    songNameBtn.X = Application.GetRealWidth(16);
-                                //    artistNameBtn.X = songNameBtn.Right;
-                                //    artistNameBtn.TextColor = UI.Music.MusicColor.MusicNoTxetColor;
-                                //}
+                                for (int i = 0; i < middViewLayout.ChildrenCount; i++)
+                                {
+                                    RowLayout view = (RowLayout)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
+                                                                                    //if (a31MusicModel.A31PlayStatus.TrackURL == songNameBtn.Tag.ToString())
+                                                                                    //{
+                                                                                    //    volIconBtn.Visible = true;
+                                                                                    //    songNameBtn.TextColor = UI.Music.MusicColor.SelectedColor;
+                                                                                    //    songNameBtn.X = Application.GetRealWidth(48);
+                                                                                    //    artistNameBtn.X = songNameBtn.Right;
+                                                                                    //    artistNameBtn.TextColor = UI.Music.MusicColor.SelectedColor;
+                                                                                    //}
+                                                                                    //else
+                                                                                    //{
+                                                                                    //    volIconBtn.Visible = false;
+                                                                                    //    songNameBtn.TextColor = UI.Music.MusicColor.MusicTxet14Color;
+                                                                                    //    songNameBtn.X = Application.GetRealWidth(16);
+                                                                                    //    artistNameBtn.X = songNameBtn.Right;
+                                                                                    //    artistNameBtn.TextColor = UI.Music.MusicColor.MusicNoTxetColor;
+                                                                                    //}
 
 
+                                }
                             }
-                        }
-                        catch { }
+                            catch { }
 
-                    });
+                        });
+                    }
                 }
+                catch (Exception e) { }
             });
             updateSelectedMusicThread.Start();
         }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
index 9cf4210..9282ad4 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -276,41 +276,49 @@
             //鏇存柊鐘舵�佺嚎绋�
             var musicThread = new System.Threading.Thread(() =>
             {
-                while (true)
+                try
                 {
-                    if (!player.functionMusic.isOnline())
+                    while (true)
                     {
-                        ///涓嶅湪绾夸笉璇荤姸鎬�
-                        continue;
-                    }
-                    //SendMethod.ReadStatus(player);
-                    SendMethod.Current.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
-                    System.Threading.Thread.Sleep(1000);
-                    Application.RunOnMainThread(() =>
-                    {
-                        musicView.singerBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name);
-                        musicView.songNameBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name);
-                        musicView.musicNameBtn.Text = player.functionMusic.name;
-                        if (player.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
+                        if (!player.functionMusic.isOnline())
                         {
-                            musicView.playBtn.IsSelected = true;
+                            ///涓嶅湪绾夸笉璇荤姸鎬�
+                            continue;
                         }
-                        else
+                        //SendMethod.ReadStatus(player);
+                        SendMethod.Current.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
+                        System.Threading.Thread.Sleep(1000);
+                        Application.RunOnMainThread(() =>
                         {
-                            musicView.playBtn.IsSelected = false;
-                        }
-                        musicView.regionBtn.Text = player.functionMusic.GetRoomListName();
+                            try
+                            {
+                                musicView.singerBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name);
+                                musicView.songNameBtn.Text = player.functionMusic.GetAttrState(KeyProperty.song_name);
+                                musicView.musicNameBtn.Text = player.functionMusic.name;
+                                if (player.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
+                                {
+                                    musicView.playBtn.IsSelected = true;
+                                }
+                                else
+                                {
+                                    musicView.playBtn.IsSelected = false;
+                                }
+                                musicView.regionBtn.Text = player.functionMusic.GetRoomListName();
 
-                        if (player.functionMusic.collect)
-                        {
-                            musicView.collectIconBtn.IsSelected = true;
-                        }
-                        else
-                        {
-                            musicView.collectIconBtn.IsSelected = false;
-                        }
-                    });
+                                if (player.functionMusic.collect)
+                                {
+                                    musicView.collectIconBtn.IsSelected = true;
+                                }
+                                else
+                                {
+                                    musicView.collectIconBtn.IsSelected = false;
+                                }
+                            }
+                            catch (Exception e) { }
+                        });
+                    }
                 }
+                catch (Exception e) { }
             })
             { IsBackground = true, Name = "A31" };
             musicThread.Start();
diff --git a/NunitTest-Android/Resources/Resource.designer.cs b/NunitTest-Android/Resources/Resource.designer.cs
index 21a62c4..ae568d0 100644
--- a/NunitTest-Android/Resources/Resource.designer.cs
+++ b/NunitTest-Android/Resources/Resource.designer.cs
@@ -15,7 +15,7 @@
 {
 	
 	
-	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.2.120")]
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
 	public partial class Resource
 	{
 		

--
Gitblit v1.8.0