From 84e76cf2fcbe26142750131d3c27eaac0335e40a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 11 三月 2021 11:04:08 +0800
Subject: [PATCH] 上传一个添加红外宝 Ios 版本
---
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs | 84 ++++++++++++++++++++++++++++++++----------
1 files changed, 64 insertions(+), 20 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
index 03ed2c1..3db0642 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
@@ -15,7 +15,7 @@
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;
@@ -64,16 +64,15 @@
areaText.FrameLayoutView(fL1, false);
areaText.nextLevelBtn.X = Application.GetRealWidth(339);
areaText.nextLevelBtn.Y = Application.GetRealHeight(17);
- areaText.nextLevelBtn.Width = Application.GetMinRealAverage(16);
- areaText.nextLevelBtn.Height = Application.GetMinRealAverage(16);
+ areaText.nextLevelBtn.Width = Application.GetRealWidth(16);
+ areaText.nextLevelBtn.Height = Application.GetRealWidth(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.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;
@@ -139,10 +138,10 @@
radioSourceView.fLayout.Y = usbSourceView.fLayout.Bottom;
radioSourceView.iconBtn.UnSelectedImagePath = "MusicIcon/radio.png";
radioSourceView.textBtn.TextID = StringId.radio;
- radioSourceView.FrameLayoutView(fL3);
+ //radioSourceView.FrameLayoutView(fL3);鏆傛椂闅愯棌鍦ㄧ嚎鐢靛彴
View.MusicSourceView qqMusicSourceView = new View.MusicSourceView();
- qqMusicSourceView.fLayout.Y = radioSourceView.fLayout.Bottom;
+ qqMusicSourceView.fLayout.Y = usbSourceView.fLayout.Bottom;
qqMusicSourceView.iconBtn.UnSelectedImagePath = "MusicIcon/qqMusic.png";
qqMusicSourceView.textBtn.TextID = StringId.qqMusic;
qqMusicSourceView.FrameLayoutView(fL3);
@@ -170,7 +169,6 @@
{
new View.TipView().InputBox(StringId.modifyName, A31MusicModel.Current.Name, StringId.nameNull, (playerName) =>
{
-
playNameView.inputTextBtn.Text = playerName;
A31MusicModel.Current.Name = playerName;
string url = "http://" + A31MusicModel.Current.IPAddress + "/httpapi.asp?command=setDeviceName:" + A31MusicModel.Current.Name;
@@ -188,14 +186,33 @@
});
};
+ ///鍖哄煙淇敼鐨勪簨浠�
+ areaText.clickBtn.MouseUpEventHandler += (sender, e) =>
+ {
+ 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) =>
{
- A31LoveList a31LoveList = new A31LoveList();
- MainPage.BasePageView.AddChidren(a31LoveList);
+ //A31LoveList a31LoveList = new A31LoveList();
+ //MainPage.BasePageView.AddChidren(a31LoveList);
+ //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ //a31LoveList.Show();
+ //a31LoveList.UpdateSelectedFile();
+
+ A31LoveMusicList a31LoveMusicList = new A31LoveMusicList();
+ MainPage.BasePageView.AddChidren(a31LoveMusicList);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- a31LoveList.Show();
- a31LoveList.UpdateSelectedFile();
+ a31LoveMusicList.Show();
+ a31LoveMusicList.UpdateSelectedMusic();
+
};
///鎴戠殑鍒楄〃浜嬩欢
myListView.clickBtn.MouseUpEventHandler += (sender, e) =>
@@ -269,16 +286,41 @@
});
});
};
+
///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 __IOS__
+ 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";
+
+#else
+ bol = HDLUtils.OpenAppWithPackageName("com.tencent.qqmusic");
+ //url = "http://music.qq.com/";
+ url = "market://details?id=com.tencent.qqmusic";
+#endif
+ if (!bol)
+ {
+ new View.TipView().TipBox1(StringId.tip, StringId.qqMsuicTip, () =>
+ {
+ HDLUtils.OpenUrl(url);
+ });
+ }
}
- CommonClass.OpenApp(str);
+ catch { }
};
+
///钃濈墮浜嬩欢
bluetoothSourceView.clickBtn.MouseUpEventHandler += (sender, e) =>
{
@@ -293,6 +335,8 @@
string url = "http://" + A31MusicModel.Current.IPAddress + "/httpapi.asp?command=setPlayerCmd:switchmode:line-in";
SendMethod.SendCommand(url);
};
+
+
#endregion
}
}
--
Gitblit v1.8.0