.vs/HDL_APP_Project/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.vs/HDL_APP_Project/xs/sqlite3/storage.ide | 补丁 | 查看 | 原始文档 | blame | 历史 | |
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,11 +1,6 @@ <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs"> <Files> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs" Line="69" Column="14" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs" Line="152" Column="30" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs" Line="47" Column="22" /> </Files> <MonoDevelop.Ide.Workbench> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> @@ -15,8 +10,7 @@ <Node name="UI2" expanded="True"> <Node name="FuntionControlView" expanded="True"> <Node name="Music" expanded="True"> <Node name="View" expanded="True" /> <Node name="A31PlayMusicPage.cs" selected="True" /> <Node name="A31MusicSourcePage.cs" selected="True" /> </Node> </Node> </Node> @@ -25,6 +19,11 @@ </Node> </State> </Pad> <Pad Id="MonoDevelop.Debugger.WatchPad"> <State> <Value>DB_ResidenceData.residenceData.functionList.functions[18].functionCategory</Value> </State> </Pad> </Pads> </MonoDevelop.Ide.Workbench> <MonoDevelop.Ide.DebuggingService.PinnedWatches /> .vs/HDL_APP_Project/xs/sqlite3/storage.ideBinary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-walBinary files differ
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs
@@ -17,18 +17,45 @@ } static List<System.Threading.Thread> updataMusicStatesListThread = new List<System.Threading.Thread>(); /// <summary> /// 读取音乐状态 /// </summary> public static void ReadMusicStates() { RemoveListThread(); if (GetCollection) { for (int i = 0; i < A31MusicModelList.Count; i++) { var a31player = A31MusicModelList[i]; var musicThread = new System.Threading.Thread(() => { while (true) { System.Threading.Thread.Sleep(1000); if (!a31player.IsOnLine) { continue; } SendMethod.ReadStatus(a31player); } }) { IsBackground = true, Name = "A31" }; musicThread.Start(); updataMusicStatesListThread.Add(musicThread); } } } /// <summary> /// 移除之前的线程 /// </summary> public static void RemoveListThread() { var threads = updataMusicStatesListThread.FindAll((obj) => { return obj.Name == "A31"; }); for (int i =0;i< updataMusicStatesListThread.Count;) for (int i = 0; i < updataMusicStatesListThread.Count;) { try { { var thread = updataMusicStatesListThread[i]; if (thread.IsAlive) { @@ -45,34 +72,11 @@ MainPage.Log("clearA31Threads over"); } } if (GetCollection) { for (int i = 0; i < A31MusicModelList.Count; i++) { var a31player = A31MusicModelList[i]; var musicThread = new System.Threading.Thread(() => { while (true) { System.Threading.Thread.Sleep(1000); if (!a31player.IsOnLine) { continue; } //A31MusicModel.ReadMusicStates(); SendMethod.ReadStatus(a31player); } }) { IsBackground = true, Name = "A31" }; musicThread.Start(); updataMusicStatesListThread.Add(musicThread); } } } /// <summary> /// 音乐列表里是否有音乐被收藏过 /// </summary> static bool GetCollection static bool GetCollection { get { @@ -259,16 +263,15 @@ } } /// <summary> /// 记录主播放器是否被收藏 /// 记录主播放器是否被收藏(秀桡定义的) /// </summary> public bool MainPlayCollection = false; public Slaves Slave = new Slaves(); /// <summary> /// 记录时间 /// </summary> public static DateTime ProgressDateTime = DateTime.Now; //static System.Threading.Tasks.Task task; //音量列表 //static List<int> volumeCommandList = new List<int> (); public static bool IsJson(string json) { @@ -284,6 +287,14 @@ { return false; } } /// <summary> /// 自定义日志输出 /// </summary> public static void LogMusic(string str) { var time = DateTime.Now; Console.WriteLine(time + str); } } @@ -329,4 +340,5 @@ public string version = string.Empty; public string uuid = string.Empty; } } HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -12,6 +12,8 @@ public MusicMain() { Tag = "MusicMain"; //进来音乐列表界面先移除之前线程; A31MusicModel.RemoveListThread(); } public override void RemoveFromParent() { @@ -20,6 +22,9 @@ A31MusicModel.ReadMusicStates();//进来没有音乐被收藏过,退出有音乐被收藏过 } static List<System.Threading.Thread> threadLists = new List<System.Threading.Thread>(); /// <summary> /// 移除线程 /// </summary> static void clearA31Threads() { var threads = threadLists.FindAll((obj) => { return obj.Name == "A31"; }); @@ -49,6 +54,7 @@ public void Show() { #region 界面布局 this.BackgroundColor = Color.ViewColor; var topView = new TopView();