From c484347d42f8c14f03f498e689069a14a45abc93 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 03 二月 2023 17:56:45 +0800 Subject: [PATCH] 2023年02月03日17:56:24 --- HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs | 98 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 71 insertions(+), 27 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs index 0ecebe6..9bc18b9 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs @@ -1,17 +1,18 @@ 锘縰sing System; using System.Collections.Generic; using System.Security; +using HDL_ON.UI.UI2.FuntionControlView.Music; using Shared; namespace HDL_ON.UI.Music { - public class A31MusicSourcePage:FrameLayout + public class A31MusicSourcePage : FrameLayout { public A31MusicSourcePage() { Tag = "Music"; } - + public void Show() { #region 鐣岄潰甯冨眬------ @@ -33,7 +34,7 @@ #region 鍩虹淇℃伅锛� 鎾斁鍣� 钃濈墮 鍖哄煙锛� FrameLayout fL1 = new FrameLayout { - Height = Application.GetRealHeight(202-50), + Height = Application.GetRealHeight(202 - 50), Width = Application.GetRealWidth(375), }; middViewLayout.AddChidren(fL1); @@ -105,7 +106,7 @@ Height = Application.GetRealHeight(352), Width = Application.GetRealWidth(375), }; - //middViewLayout.AddChidren(fL3); + middViewLayout.AddChidren(fL3); View.MusicSourceView selectedSourceView = new View.MusicSourceView(); selectedSourceView.fLayout.Height = Application.GetRealHeight(44); @@ -114,7 +115,7 @@ selectedSourceView.textBtn.TextSize = TextSize.Text16; selectedSourceView.inputTextBtn.Visible = false; selectedSourceView.nextLevelBtn.Visible = false; - //selectedSourceView.FrameLayoutView(fL3, false); + selectedSourceView.FrameLayoutView(fL3, false); View.MusicSourceView musicSourceView = new View.MusicSourceView(); musicSourceView.fLayout.Y = selectedSourceView.fLayout.Bottom; @@ -122,10 +123,16 @@ musicSourceView.textBtn.TextID = StringId.localMusic; //musicSourceView.FrameLayoutView(fL3); - + View.MusicSourceView usbSourceView = new View.MusicSourceView(); + //usbSourceView.fLayout.Y = selectedSourceView.fLayout.Bottom; + usbSourceView.iconBtn.UnSelectedImagePath = "MusicIcon/usb.png"; + usbSourceView.textBtn.TextID = StringId.usb; + usbSourceView.FrameLayoutView(fL3); + + View.MusicSourceView bluetoothSourceView = new View.MusicSourceView(); - bluetoothSourceView.fLayout.Y = musicSourceView.fLayout.Bottom; + bluetoothSourceView.fLayout.Y = usbSourceView.fLayout.Bottom; bluetoothSourceView.iconBtn.UnSelectedImagePath = "MusicIcon/bluetooth.png"; bluetoothSourceView.textBtn.TextID = StringId.bluetooth; //bluetoothSourceView.FrameLayoutView(fL3); @@ -142,24 +149,62 @@ #endregion #region 鎵�鏈夌偣鍑讳簨浠� - ///浜嬩欢 + ///鏈湴闊充箰浜嬩欢 musicSourceView.clickBtn.MouseUpEventHandler += (sender, e) => { - A31MusicFileList a31MusicFileList = new A31MusicFileList(); - MainPage.BasePageView.AddChidren(a31MusicFileList); - a31MusicFileList.Show(); + //A31UsbMusicList a31UsbMusicList = new A31UsbMusicList(); + //MainPage.BasePageView.AddChidren(a31UsbMusicList); + //a31UsbMusicList.Show(); + //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + //Loading loading = new Loading(); + //a31UsbMusicList.AddChidren(loading); + //loading.Start(); + //System.Threading.Tasks.Task.Run(() => + //{ + // try + // { + // if (A31MusicModel.Current.UsbMusicLists.Count == 0) + // { + // SendMethod.Current.GetCurrentPalyList(A31MusicModel.Current.functionMusic); + + // } + // } + // catch + // { + // } + // finally + // { + // Application.RunOnMainThread(() => + // { + // loading.Hide(); + // //a31UsbMusicList.FileView(); + // }); + // } + //}); + }; + + ///usb浜嬩欢 + usbSourceView.clickBtn.MouseUpEventHandler += (sender, e) => + { + + A31FlieList a31FlieList = new A31FlieList(KeyProperty.sdcard, usbSourceView.textBtn.Text); + MainPage.BasePageView.AddChidren(a31FlieList); + a31FlieList.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; Loading loading = new Loading(); - a31MusicFileList.AddChidren(loading); + a31FlieList.AddChidren(loading); loading.Start(); + var listNameList = CommonMethod.Current.GetListNameListMemory(KeyProperty.sdcard); System.Threading.Tasks.Task.Run(() => { try { - if (A31MusicModel.Current.palyLists.Count == 0) + + if (listNameList.Count == 0) { - SendMethod.Current.GetPalyList(A31MusicModel.Current.functionMusic); - + var Group = SendMethod.Current.GetSingleSourceListNameList(A31MusicModel.Current.functionMusic, KeyProperty.sdcard); + CommonMethod.Current.AddSourceGroupListMemory(Group);//淇濆瓨缂撳瓨 + listNameList.AddRange(Group.groupList);//鏇存柊鍒楄〃鍊� } } catch @@ -170,10 +215,11 @@ Application.RunOnMainThread(() => { loading.Hide(); - a31MusicFileList.FileView(); + a31FlieList.FileListView(listNameList); }); } }); + }; @@ -189,7 +235,7 @@ { try { - SendMethod.Current.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId,playerName); + SendMethod.Current.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId, playerName); } catch { } @@ -198,7 +244,7 @@ }); }; - + ///鍖哄煙淇敼鐨勪簨浠� areaText.clickBtn.MouseUpEventHandler += (sender, e) => { @@ -235,15 +281,13 @@ //a31MyList.Show(); //a31MyList.UpdateSelectedFile(); //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - + System.Threading.Tasks.Task.Run(() => { try { - //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device); - var palyListName = Music.SendMethod.Current.GetListName(A31MusicModel.Current.functionMusic); - var palyList = Music.SendMethod.Current.GetListMusic(A31MusicModel.Current.functionMusic, "hdl_special"); + var palyList = Music.SendMethod.Current.GetSingleSongList(A31MusicModel.Current.functionMusic, "hdl_special", ""); List<string> musicNameList = new List<string>(); for (int i = 0; i < palyList.songs.Count; i++) { @@ -255,8 +299,8 @@ UI2.Intelligence.Automation.PublicInterface publicInterface = new UI2.Intelligence.Automation.PublicInterface(); publicInterface.FrameOrVv(this, musicNameList, new List<string> { "123" }, palyList.group, (index) => { - - + + }, false); }); @@ -265,9 +309,9 @@ }); }; - - - + + + ///钃濈墮浜嬩欢 bluetoothSourceView.clickBtn.MouseUpEventHandler += (sender, e) => -- Gitblit v1.8.0