From 7b96ea115d51fb721130fef8622500740dea7b08 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 25 八月 2022 18:06:29 +0800
Subject: [PATCH] 2022年08月25日18:06:27

---
 HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
index cd2c148..44bf12c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -10,16 +10,16 @@
 {
     public class MusicMain : FrameLayout
     {
-        private static MusicMain m_MusicMain = null;
-        public static MusicMain mMusicMain
+        private static MusicMain s_Current = null;  
+        public static MusicMain Current
         {
             get
             {
-                if (m_MusicMain == null)
+                if (s_Current == null)
                 {
-                    m_MusicMain = new MusicMain();
+                    s_Current = new MusicMain();
                 }
-                return m_MusicMain;
+                return s_Current;
             }
 
         }
@@ -36,7 +36,7 @@
         public override void RemoveFromParent()
         {
             base.RemoveFromParent();
-            clearA31Threads();
+            ClearA31Threads();
             //杩涙潵娌℃湁闊充箰琚敹钘忚繃锛岄��鍑烘湁闊充箰琚敹钘忚繃
             //A31MusicModel.ReadMusicStates();
         }
@@ -47,7 +47,7 @@
         /// <summary>
         /// 绉婚櫎绾跨▼
         /// </summary>
-        static void clearA31Threads()
+        static void ClearA31Threads() 
         {
 
             var threads = threadLists.FindAll((obj) => { return obj.Name == "A31"; });
@@ -119,10 +119,10 @@
             {
                 verticalRefresh.RemoveAll();
                 A31MusicModel.A31MusicModelList.Clear();
-                var musicListFunction = FunctionList.List.GetMusicList();
-                for (int i = 0; i < musicListFunction.Count; i++)
+                var musicDeviceList= FunctionList.List.GetMusicList(); 
+                for (int i = 0; i < musicDeviceList.Count; i++)
                 {
-                    var function = musicListFunction[i]; 
+                    var function = musicDeviceList[i]; 
                     var music = A31MusicModel.A31MusicModelList.Find((obj) =>
                    (obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.MusicStandard) || (
                      obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.AvMusic)
@@ -168,7 +168,7 @@
                         try
                         {
                             
-                            SendMethod.mMethod.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
+                            SendMethod.Current.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
                             System.Threading.Thread.Sleep(500);
                         }
                         catch { }
@@ -233,7 +233,7 @@
                 player.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.up);
                 Dictionary<string, string> dic = new Dictionary<string, string>();
                 dic.Add(KeyProperty.song_step, ValueProperty.up);
-                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
+                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
             };
             musicView.prevBtn.MouseUpEventHandler += (sender, e) =>
             {
@@ -256,7 +256,7 @@
                 player.functionMusic.SetAttrState(KeyProperty.on_off, status);
                 Dictionary<string, string> dic = new Dictionary<string, string>();
                 dic.Add(KeyProperty.on_off, status);
-                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
+                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
             };
             ///涓嬩竴鏇茬偣鍑讳簨浠�
             musicView.nextBtn.MouseDownEventHandler += (sender, e) =>
@@ -265,7 +265,7 @@
                 player.functionMusic.SetAttrState(KeyProperty.song_step, ValueProperty.down);
                 Dictionary<string, string> dic = new Dictionary<string, string>();
                 dic.Add(KeyProperty.song_step, ValueProperty.down);
-                SendMethod.mMethod.SendControlCommand(player.functionMusic, dic);
+                SendMethod.Current.SendControlCommand(player.functionMusic, dic);
             };
             musicView.nextBtn.MouseUpEventHandler += (sender, e) =>
             {
@@ -282,7 +282,7 @@
                         continue;
                     }
                     //SendMethod.ReadStatus(player);
-                    SendMethod.mMethod.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
+                    SendMethod.Current.GetDeviceStatus(ref player, new List<string> { player.functionMusic.deviceId }, player.functionMusic.sid);
                     System.Threading.Thread.Sleep(1000);
                     Application.RunOnMainThread(() =>
                     {

--
Gitblit v1.8.0