From 611786df5108dca0bdcff03834cc285cba4b8e61 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 13 十月 2020 16:48:43 +0800
Subject: [PATCH] 2020-10-13-1

---
 HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs |   67 ++++++++++++++++++++++-----------
 1 files changed, 45 insertions(+), 22 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
index e521548..b95f664 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
@@ -4,18 +4,18 @@
 using Shared;
 namespace HDL_ON.UI.Music
 {
-    public class A31MusicSourcePage:FrameLayout
+    public class A31MusicSourcePage : FrameLayout
     {
         public A31MusicSourcePage()
         {
             Tag = "Music";
         }
 
-       
+
         public void Show()
         {
             #region   鐣岄潰甯冨眬------
-            this.BackgroundColor = Color.ViewColor;
+            this.BackgroundColor = MusicColor.ViewColor;
             var topView = new TopView();
             this.AddChidren(topView.TopFLayoutView());
             topView.topNameBtn.TextID = StringId.set;
@@ -41,7 +41,7 @@
             View.MusicSourceView musicIfonView = new View.MusicSourceView();
             musicIfonView.fLayout.Height = Application.GetRealHeight(44);
             musicIfonView.textBtn.TextID = StringId.information;
-            musicIfonView.textBtn.TextColor = Color.SelectedColor;
+            musicIfonView.textBtn.TextColor = MusicColor.SelectedColor;
             musicIfonView.textBtn.TextSize = TextSize.Text16;
             musicIfonView.inputTextBtn.Visible = false;
             musicIfonView.nextLevelBtn.Visible = false;
@@ -67,13 +67,12 @@
             areaText.nextLevelBtn.Width = Application.GetMinRealAverage(16);
             areaText.nextLevelBtn.Height = Application.GetMinRealAverage(16);
             areaText.nextLevelBtn.UnSelectedImagePath = "MusicIcon/sourceNetx.png";
-            areaText.lineBtn.BackgroundColor = Color.WhiteColor;
+            areaText.lineBtn.BackgroundColor = MusicColor.WhiteColor;
             areaText.textBtn.X = Application.GetRealWidth(16);
             areaText.textBtn.TextID = StringId.region;
             areaText.inputTextBtn.Text = A31MusicModel.Current.GetRoomListName();
 
             #endregion
-
 
             #region 姝屽崟锛堟垜鐨勬渶鐖� 鎴戠殑鍒楄〃锛�
             FrameLayout fL2 = new FrameLayout
@@ -86,7 +85,7 @@
             View.MusicSourceView playListView = new View.MusicSourceView();
             playListView.fLayout.Height = Application.GetRealHeight(44);
             playListView.textBtn.TextID = StringId.playList;
-            playListView.textBtn.TextColor = Color.SelectedColor;
+            playListView.textBtn.TextColor = MusicColor.SelectedColor;
             playListView.textBtn.TextSize = TextSize.Text16;
             playListView.inputTextBtn.Visible = false;
             playListView.nextLevelBtn.Visible = false;
@@ -117,7 +116,7 @@
             View.MusicSourceView selectedSourceView = new View.MusicSourceView();
             selectedSourceView.fLayout.Height = Application.GetRealHeight(44);
             selectedSourceView.textBtn.TextID = StringId.selectedSource;
-            selectedSourceView.textBtn.TextColor = Color.SelectedColor;
+            selectedSourceView.textBtn.TextColor = MusicColor.SelectedColor;
             selectedSourceView.textBtn.TextSize = TextSize.Text16;
             selectedSourceView.inputTextBtn.Visible = false;
             selectedSourceView.nextLevelBtn.Visible = false;
@@ -190,15 +189,14 @@
             ///鍖哄煙淇敼鐨勪簨浠�
             areaText.clickBtn.MouseUpEventHandler += (sender, e) =>
             {
-                ///鏆傛椂闅愯棌
-                //ChooseRoomPage chooseRoomPage = new ChooseRoomPage(A31MusicModel.Current, () =>
-                //{
-                //    areaText.inputTextBtn.Text = A31MusicModel.Current.GetRoomListName();
-                //});
-                //MainPage.BasePageView.AddChidren(chooseRoomPage);
-                //chooseRoomPage.LoadPage();
-                //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
+                ChooseRoomPage chooseRoomPage = new ChooseRoomPage(A31MusicModel.Current, () =>
+                {
+                    areaText.inputTextBtn.Text = A31MusicModel.Current.GetRoomListName();
+                    A31MusicModel.Save();
+                });
+                MainPage.BasePageView.AddChidren(chooseRoomPage);
+                chooseRoomPage.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
             };
             ///鎴戠殑鍠滅埍浜嬩欢
             myLoveView.clickBtn.MouseUpEventHandler += (sender, e) =>
@@ -250,7 +248,7 @@
                     {
                         if (A31MusicModel.Current.USBList.Count == 0)
                         {
-                            //杩涙潵璇讳竴娆�(娉ㄦ剰:鎾斁鍦板潃鍙兘浼氭敼鍙橈紝瀵艰嚧鎾斁涓嶄簡闊充箰;瑙e喅:杩涙潵閮藉幓鍘昏鍙栨渶鏂版暟鎹�)
+                            //杩涙潵璇讳竴娆�(娉ㄦ剰:鎾斁鍦板潃鍙兘浼氭敼鍙橈紝瀵艰嚧鎾斁涓嶄簡闊充箰;瑙e喅:杩涙潵閮藉幓璇诲彇鏈�鏂版暟鎹�)
                             var list = SendMethod.GetUsbList(A31MusicModel.Current);
                             A31MusicModel.Current.USBList.AddRange(list);
                         }
@@ -291,12 +289,35 @@
             ///QQ闊充箰浜嬩欢
             qqMusicSourceView.clickBtn.MouseUpEventHandler += (sender, e) =>
             {
-                string str = "com.tencent.qqmusic";
-                if (Application.DeviceType == Device.Ios)
+                //string str = "com.tencent.qqmusic";
+                //if (Application.DeviceType == Device.Ios)
+                //{
+                //    str = "qqmusic:";
+                //}
+                //CommonClass.OpenApp(str);
+
+                bool bol = false;
+                string url = "";
+                try
                 {
-                    str = "qqmusic:";
+#if Android
+                                    bol = HDLUtils.OpenAppWithPackageName("com.tencent.qqmusic");
+                                    //url = "http://music.qq.com/";
+                                    url = "market://details?id=com.tencent.qqmusic";
+
+#else
+                    bol = HDLUtils.OpenApp("qqmusic://");
+                    url = "https://apps.apple.com/cn/app/qq%E9%9F%B3%E4%B9%90-%E8%AE%A9%E7%94%9F%E6%B4%BB%E5%85%85%E6%BB%A1%E9%9F%B3%E4%B9%90/id414603431";
+#endif
+                    if (!bol)
+                    {
+                        new View.TipView().TipBox1(StringId.tip, StringId.qqMsuicTip, () =>
+                        {
+                            HDLUtils.OpenUrl(url);
+                        });
+                    }
                 }
-                CommonClass.OpenApp(str);
+                catch { }
             };
             ///钃濈墮浜嬩欢
             bluetoothSourceView.clickBtn.MouseUpEventHandler += (sender, e) =>
@@ -316,5 +337,7 @@
 
             #endregion
         }
+      
+
     }
 }

--
Gitblit v1.8.0