From 592974441a4df95fffd9167c90192da1a390b1c2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 06 六月 2023 11:51:12 +0800
Subject: [PATCH] Merge branch 'Dev-Branch'

---
 HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs |  125 +++++++++++++++++++++++++++++++++--------
 1 files changed, 99 insertions(+), 26 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
index 8dba2e9..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.mMethod.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.mMethod.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId,playerName);
+                            SendMethod.Current.EditDeviceName(A31MusicModel.Current.functionMusic.deviceId, playerName);
                         }
                         catch { }
 
@@ -198,7 +244,7 @@
                 });
 
             };
-           
+
             ///鍖哄煙淇敼鐨勪簨浠�
             areaText.clickBtn.MouseUpEventHandler += (sender, e) =>
             {
@@ -230,15 +276,42 @@
             ///鎴戠殑鍒楄〃浜嬩欢
             myListView.clickBtn.MouseUpEventHandler += (sender, e) =>
             {
-                A31MyList a31MyList = new A31MyList();
-                MainPage.BasePageView.AddChidren(a31MyList);
-                a31MyList.Show();
-                a31MyList.UpdateSelectedFile();
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                //A31MyList a31MyList = new A31MyList();
+                //MainPage.BasePageView.AddChidren(a31MyList);
+                //a31MyList.Show();
+                //a31MyList.UpdateSelectedFile();
+                //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+                System.Threading.Tasks.Task.Run(() =>
+                {
+                    try
+                    {
+
+                        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++)
+                        {
+                            var music = palyList.songs[i];
+                            musicNameList.Add(music.name);
+                        }
+                        Application.RunOnMainThread(() =>
+                        {
+                            UI2.Intelligence.Automation.PublicInterface publicInterface = new UI2.Intelligence.Automation.PublicInterface();
+                            publicInterface.FrameOrVv(this, musicNameList, new List<string> { "123" }, palyList.group, (index) =>
+                            {
+
+
+                            }, false);
+
+                        });
+                    }
+                    catch { }
+
+                });
             };
-          
-     
-          
+
+
+
 
             ///钃濈墮浜嬩欢
             bluetoothSourceView.clickBtn.MouseUpEventHandler += (sender, e) =>

--
Gitblit v1.8.0