From 9f4190da49187e9df86cec915f6ba82baf6058ac Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 04 六月 2020 17:45:22 +0800
Subject: [PATCH] 2020-06-04-3
---
HDL_ON/UI/Music/View/DialogView.cs | 111 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 92 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/UI/Music/View/DialogView.cs b/HDL_ON/UI/Music/View/DialogView.cs
index e4654dd..44b0034 100644
--- a/HDL_ON/UI/Music/View/DialogView.cs
+++ b/HDL_ON/UI/Music/View/DialogView.cs
@@ -342,10 +342,9 @@
TextColor = Color.TextColor,
TextSize = TextSize.Text14,
TextAlignment = TextAlignment.CenterLeft,
- Text = player.Name,
+ Text = NamePlayer(player),
};
PlayRow.AddChidren(PlayNameBtn);
-
//閫変腑鍥炬爣鎺т欢
Button selectedIconBtn = new Button
@@ -404,6 +403,20 @@
if (playList1.Count <= 1)
{
new PublicAssmebly().TipMsgAutoClose("鑷冲皯閫変腑涓や釜浠ヤ笂鎾斁鍣�", false);
+ return;
+ }
+ int number = 0;
+ foreach (var musin in playList1)
+ {
+ if (musin.ServerClientType == 1)
+ {
+ number++;
+ }
+ }
+ if (number >= 2)
+ {
+ new PublicAssmebly().TipMsgAutoClose("涓嶈兘閫変腑涓や釜鎴栦袱涓互涓婁富鎾斁鍣ㄨ繘琛岀粍鍚�", false);
+ //濡傛灉閮芥槸涓绘挱鏀炬垜灏变笉鑳界粍鍚�;
return;
}
///鏌ヨ鏄惁宸茬粡瀛樺湪涓绘挱鏀�;
@@ -548,19 +561,66 @@
};
verticalScrolViewLayout.AddChidren(addFlieRow);
- //鎾斁鍣ㄥ悕绉版帶浠�
- Button PlayNameBtn = new Button
+ if (player.A31PlayStatus.status == "play")
{
- X = Application.GetRealWidth(20),
- Y = Application.GetRealHeight(15),
- Width = Application.GetRealWidth(150),
- Height = Application.GetRealHeight(20),
- TextColor = Color.TextColor,
- TextSize = TextSize.Text14,
- TextAlignment = TextAlignment.CenterLeft,
- Text = player.Name,
- };
- addFlieRow.AddChidren(PlayNameBtn);
+ Button songNameBtn = new Button
+ {
+ X = Application.GetRealWidth(20),
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(150),
+ Height = Application.GetRealHeight(20),
+ TextColor = Color.TextColor,
+ TextSize = TextSize.Text14,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = player.A31PlayStatus.Title,
+ };
+ addFlieRow.AddChidren(songNameBtn);
+
+ var wText = songNameBtn.GetTextWidth();//鑾峰彇鏂囨湰瀹藉害
+ if (wText > 280)
+ {
+ songNameBtn.Width = Application.GetRealWidth(280);
+ }
+ else
+ {
+ songNameBtn.Width = wText + 5;
+ }
+ //姝屾墜鎺т欢
+ Button singerBtn = new Button
+ {
+ X = songNameBtn.Right,
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(280 - songNameBtn.Width),
+ Height = Application.GetRealHeight(20),
+ TextColor = Color.MusicNoTxetColor,
+ TextSize = TextSize.Text12,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = "-" + player.A31PlayStatus.Artist.Trim(),
+ };
+ addFlieRow.AddChidren(singerBtn);
+ if (wText > 280)
+ {
+ ///姝屽悕闀垮害灏忎簬250鎵嶅彲浠ユ樉绀烘瓕鎵嬪嚭鏉�
+ singerBtn.Width = Application.GetRealWidth(0);
+ }
+ }
+ else
+ {
+ //鎾斁鍣ㄥ悕绉版帶浠�
+ Button PlayNameBtn = new Button
+ {
+ X = Application.GetRealWidth(20),
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(150),
+ Height = Application.GetRealHeight(20),
+ TextColor = Color.TextColor,
+ TextSize = TextSize.Text14,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = NamePlayer(player),
+ };
+ addFlieRow.AddChidren(PlayNameBtn);
+
+ }
//閫変腑鍥炬爣鎺т欢
Button selectedIconBtn = new Button
@@ -608,7 +668,7 @@
}
dialogF.Close();
dialog.Close();
-
+
var serverMusic = selectedBtn.Tag as A31MusicModel;
MergeThreading(serverMusic, musicList1);
};
@@ -680,8 +740,8 @@
TextSize = TextSize.Text16,
TextAlignment = TextAlignment.Center,
//TextID = StringId.selectedMergence,
+ Text = "閫変腑瑙i櫎鎾斁鍣�",
IsBold = true,
- Text= a31player.Name,
};
topFra.AddChidren(txetBtn);
@@ -743,7 +803,7 @@
TextColor = Color.TextColor,
TextSize = TextSize.Text14,
TextAlignment = TextAlignment.CenterLeft,
- Text = player.Name,
+ Text = NamePlayer(player),
};
PlayRow.AddChidren(PlayNameBtn);
@@ -772,7 +832,7 @@
{
clickBtn.IsSelected = !clickBtn.IsSelected;
selectedIconBtn.IsSelected = clickBtn.IsSelected;
- var uuid = playList2.Find((obj) => obj.UniqueDeviceName== clickBtn.Tag.ToString());
+ var uuid = playList2.Find((obj) => obj.UniqueDeviceName == clickBtn.Tag.ToString());
if (selectedIconBtn.IsSelected)
{
if (uuid == null)
@@ -810,7 +870,7 @@
dialog.Close();
RemoveThreading(a31player, playList2);
};
- }
+ }
/// <summary>
/// 鍙戦�佺粍鍚堝懡浠ら�昏緫澶勭悊鐨勬柟娉�
/// </summary>
@@ -1064,6 +1124,19 @@
});
}
+
+ public string NamePlayer(A31MusicModel a31player)
+ {
+ if (a31player.ServerClientType == 1)
+ {
+ return a31player.MainPlayName;
+ }
+ else
+ {
+ return a31player.Name;
+ }
+ }
+
}
[System.Serializable]
public class A31Wifi鈥� {
--
Gitblit v1.8.0