| | |
| | | TextColor = Color.TextColor, |
| | | TextSize = TextSize.Text14, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = player.Name, |
| | | Text = NamePlayer(player), |
| | | }; |
| | | PlayRow.AddChidren(PlayNameBtn); |
| | | |
| | | |
| | | //选中图标控件 |
| | | Button selectedIconBtn = new Button |
| | |
| | | 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; |
| | | } |
| | | ///查询是否已经存在主播放; |
| | |
| | | }; |
| | | 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 |
| | |
| | | } |
| | | dialogF.Close(); |
| | | dialog.Close(); |
| | | |
| | | |
| | | var serverMusic = selectedBtn.Tag as A31MusicModel; |
| | | MergeThreading(serverMusic, musicList1); |
| | | }; |
| | |
| | | TextSize = TextSize.Text16, |
| | | TextAlignment = TextAlignment.Center, |
| | | //TextID = StringId.selectedMergence, |
| | | Text = "选中解除播放器", |
| | | IsBold = true, |
| | | Text= a31player.Name, |
| | | }; |
| | | topFra.AddChidren(txetBtn); |
| | | |
| | |
| | | TextColor = Color.TextColor, |
| | | TextSize = TextSize.Text14, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = player.Name, |
| | | Text = NamePlayer(player), |
| | | }; |
| | | PlayRow.AddChidren(PlayNameBtn); |
| | | |
| | |
| | | { |
| | | 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) |
| | |
| | | dialog.Close(); |
| | | RemoveThreading(a31player, playList2); |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 发送组合命令逻辑处理的方法 |
| | | /// </summary> |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | public string NamePlayer(A31MusicModel a31player) |
| | | { |
| | | if (a31player.ServerClientType == 1) |
| | | { |
| | | return a31player.MainPlayName; |
| | | } |
| | | else |
| | | { |
| | | return a31player.Name; |
| | | } |
| | | } |
| | | |
| | | } |
| | | [System.Serializable] |
| | | public class A31Wifi
{ |