mac
2024-07-25 f9181a9c8125136f597add7c30cb2ff508d54ba7
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();
        }