| | |
| | | /// </summary> |
| | | public void PlayMergence(A31MusicModel a31MusicModel) |
| | | { |
| | | |
| | | int number1 = 0; |
| | | for (int i = 0; i < A31MusicModel.A31MusicModelList.Count; i++) |
| | | { |
| | | var player = A31MusicModel.A31MusicModelList[i]; |
| | | if (!player.IsOnLine) |
| | | { |
| | | //不在线不显示; |
| | | continue; |
| | | } |
| | | number1 = number1 + 1; |
| | | } |
| | | #region |
| | | |
| | | //主控件 |
| | |
| | | FrameLayout dialogFra = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(397), |
| | | Y = Application.GetRealHeight(667 - (50 + number1 * 50) - 20), |
| | | Width = Application.GetRealWidth(344), |
| | | Height = Application.GetRealHeight(250), |
| | | Height = Application.GetRealHeight(50 + number1 * 50), |
| | | BackgroundColor = MusicColor.WhiteColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | }; |
| | |
| | | TextSize = TextSize.Text14, |
| | | }; |
| | | topFra.AddChidren(confirmBtn); |
| | | |
| | | VerticalScrolViewLayout verticalScrolViewLayout = new VerticalScrolViewLayout |
| | | ///大于4用上下滑动控件 |
| | | VerticalScrolViewLayout verticalScrolViewLayout = null; |
| | | FrameLayout frameLayout = null; |
| | | if (number1 > 4) |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | }; |
| | | dialogFra.AddChidren(verticalScrolViewLayout); |
| | | verticalScrolViewLayout = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | |
| | | }; |
| | | dialogFra.AddChidren(verticalScrolViewLayout); |
| | | |
| | | } |
| | | else |
| | | { |
| | | frameLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | |
| | | }; |
| | | dialogFra.AddChidren(frameLayout); |
| | | } |
| | | |
| | | var playList1 = new List<A31MusicModel>(); |
| | | for (int i = 0; i < A31MusicModel.A31MusicModelList.Count; i++) |
| | | { |
| | |
| | | RowLayout PlayRow = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | LineColor = MusicColor.WhiteColor, |
| | | SubViewWidth = Application.GetRealWidth(80),//改变编辑控件宽度多少; |
| | | LineColor = 0x00000000, |
| | | }; |
| | | verticalScrolViewLayout.AddChidren(PlayRow); |
| | | |
| | | if (number1 > 4) |
| | | { |
| | | verticalScrolViewLayout.AddChidren(PlayRow); |
| | | } |
| | | else |
| | | { |
| | | PlayRow.Y = Application.GetRealHeight(i * 50); |
| | | frameLayout.AddChidren(PlayRow); |
| | | } |
| | | |
| | | //播放器名称控件 |
| | | Button PlayNameBtn = new Button |
| | |
| | | SelectedImagePath = "MusicIcon/selectedIcon.png", |
| | | }; |
| | | PlayRow.AddChidren(selectedIconBtn); |
| | | |
| | | |
| | | |
| | | ///加大几点范围 |
| | | Button clickBtn = new Button |
| | |
| | | } |
| | | } |
| | | }; |
| | | //线 |
| | | Button lineBtn = new Button |
| | | { |
| | | Y = PlayRow.Height - 1, |
| | | X = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(304), |
| | | Height = 1, |
| | | BackgroundColor = MusicColor.LineColor, |
| | | }; |
| | | PlayRow.AddChidren(lineBtn); |
| | | } |
| | | #endregion |
| | | confirmBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | addFlieRow.AddChidren(songNameBtn); |
| | | |
| | | var wText = songNameBtn.GetTextWidth();//获取文本宽度 |
| | | if (wText >Application.GetRealWidth(220)) |
| | | if (wText > Application.GetRealWidth(220)) |
| | | { |
| | | songNameBtn.Width = Application.GetRealWidth(220); |
| | | } |
| | |
| | | { |
| | | X = songNameBtn.Right, |
| | | Y = Application.GetRealHeight(15), |
| | | Width = Application.GetRealWidth(220)- wText, |
| | | Width = Application.GetRealWidth(220) - wText, |
| | | Height = Application.GetRealHeight(20), |
| | | TextColor = MusicColor.MusicNoTxetColor, |
| | | TextSize = TextSize.Text12, |
| | |
| | | /// </summary> |
| | | public void DetachPlayMergence(A31MusicModel a31player) |
| | | { |
| | | |
| | | int number1 = 0; |
| | | for (int i = 0; i < A31MusicModel.A31MusicModelList.Count; i++) |
| | | { |
| | | var player = A31MusicModel.A31MusicModelList[i]; |
| | | if (!player.IsOnLine) |
| | | { |
| | | //不在线不显示; |
| | | continue; |
| | | } |
| | | number1 = number1 + 1; |
| | | } |
| | | #region |
| | | //主控件 |
| | | Dialog dialog = new Dialog() |
| | |
| | | FrameLayout dialogFra = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(397), |
| | | Y = Application.GetRealHeight(667 - (50 + number1 * 50) - 20), |
| | | Width = Application.GetRealWidth(344), |
| | | Height = Application.GetRealHeight(250), |
| | | Height = Application.GetRealHeight(50 + number1 * 50), |
| | | BackgroundColor = MusicColor.WhiteColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | }; |
| | |
| | | TextSize = TextSize.Text14, |
| | | }; |
| | | topFra.AddChidren(confirmBtn); |
| | | |
| | | VerticalScrolViewLayout verticalScrolViewLayout = new VerticalScrolViewLayout |
| | | ///大于4用上下滑动控件 |
| | | VerticalScrolViewLayout verticalScrolViewLayout = null; |
| | | FrameLayout frameLayout = null; |
| | | if (number1 > 4) |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | }; |
| | | dialogFra.AddChidren(verticalScrolViewLayout); |
| | | verticalScrolViewLayout = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | |
| | | }; |
| | | dialogFra.AddChidren(verticalScrolViewLayout); |
| | | |
| | | } |
| | | else |
| | | { |
| | | frameLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = dialogFra.Height - Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(344), |
| | | |
| | | }; |
| | | dialogFra.AddChidren(frameLayout); |
| | | } |
| | | |
| | | var playList1 = new List<A31MusicModel>(); |
| | | playList1.Add(a31player); |
| | |
| | | RowLayout PlayRow = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | LineColor = MusicColor.WhiteColor, |
| | | SubViewWidth = Application.GetRealWidth(80),//改变编辑控件宽度多少; |
| | | LineColor =0x00000000, //MusicColor.WhiteColor, |
| | | }; |
| | | verticalScrolViewLayout.AddChidren(PlayRow); |
| | | |
| | | if (number1 > 4) |
| | | { |
| | | verticalScrolViewLayout.AddChidren(PlayRow); |
| | | } |
| | | else |
| | | { |
| | | PlayRow.Y = Application.GetRealHeight(i * 50); |
| | | frameLayout.AddChidren(PlayRow); |
| | | } |
| | | |
| | | //播放器名称控件 |
| | | Button PlayNameBtn = new Button |
| | |
| | | } |
| | | } |
| | | }; |
| | | //线 |
| | | Button lineBtn = new Button |
| | | { |
| | | Y = PlayRow.Height - 1, |
| | | X = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(304), |
| | | Height = 1, |
| | | BackgroundColor = MusicColor.LineColor, |
| | | }; |
| | | PlayRow.AddChidren(lineBtn); |
| | | |
| | | } |
| | | #endregion |
| | | confirmBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | void MergeThreading(A31MusicModel serverMusic, List<A31MusicModel> musicList1) |
| | | { |
| | | A31MusicModel mainModel = null; |
| | | bool mainModelCollection = false; |
| | | bool mainModelCollection = false; |
| | | MusicMain.loading.Start(Language.StringByID(StringId.inConfiguration)); |
| | | bool _if = false; |
| | | System.Threading.Tasks.Task.Run(() => |
| | |
| | | for (int j = 0; j < A31MusicModel.A31MusicModelList.Count; j++) |
| | | { |
| | | var music = A31MusicModel.A31MusicModelList[j]; |
| | | if(music.collection && !mainModelCollection) |
| | | if (music.collection && !mainModelCollection) |
| | | { |
| | | mainModelCollection = true; |
| | | } |
| | |
| | | } |
| | | } |
| | | serverMusic.MainPlayName = str; |
| | | foreach(var music in A31MusicModel.A31MusicModelList) |
| | | foreach (var music in A31MusicModel.A31MusicModelList) |
| | | { |
| | | if(music.ServerClientType == 1) |
| | | if (music.ServerClientType == 1) |
| | | { |
| | | music.MainPlayCollection = mainModelCollection; |
| | | } |
| | |
| | | MusicMain.loading.Start(Language.StringByID(StringId.lifting)); |
| | | var slaveList = new List<Slave>(); |
| | | slaveList.AddRange(a31player.Slave.slave_list); |
| | | // bool host_If = false; //表示是否显示解除的播放 |
| | | // bool host_If = false; //表示是否显示解除的播放 |
| | | bool _if = false; |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | |
| | | return a31player.Name; |
| | | } |
| | | } |
| | | |
| | | |
| | | List<A31MusicModel> volumePlayList = new List<A31MusicModel>(); |
| | | A31MusicModel currVolumePlay = null;//当前的播放器 |
| | | int startVolume = 0;//之前的音量 |
| | | int endVolume = 0;//现在的音量 |
| | | string if_volume ="";//标记是调节总音量还是单个播放器音量; |
| | | string if_volume = "";//标记是调节总音量还是单个播放器音量; |
| | | /// <summary> |
| | | /// 播放器音量的界面 |
| | | /// </summary> |
| | |
| | | FrameLayout dialogFra = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(397-20), |
| | | Y = Application.GetRealHeight(397 - 20), |
| | | Width = Application.GetRealWidth(344), |
| | | Height = Application.GetRealHeight(250+20), |
| | | Height = Application.GetRealHeight(250 + 20), |
| | | BackgroundColor = MusicColor.WhiteColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | }; |
| | |
| | | }; |
| | | topFra.AddChidren(confirmBtn); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler= (sen,e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sen, e) => |
| | | { |
| | | volumedialog.Close(); |
| | | if (updateVolumeThread != null) |
| | | { |
| | |
| | | |
| | | VerticalScrolViewLayout volumeViewLayout = new VerticalScrolViewLayout |
| | | { |
| | | Y =Application.GetRealHeight(58+64), |
| | | Height = dialogFra.Height - Application.GetRealHeight(58+64), |
| | | Y = Application.GetRealHeight(58 + 64), |
| | | Height = dialogFra.Height - Application.GetRealHeight(58 + 64), |
| | | Width = Application.GetRealWidth(343), |
| | | }; |
| | | dialogFra.AddChidren(volumeViewLayout); |
| | |
| | | { |
| | | X = Application.GetRealWidth(289), |
| | | Y = Application.GetRealHeight(31), |
| | | Width = Application.GetRealWidth(26+15), |
| | | Width = Application.GetRealWidth(26 + 15), |
| | | Height = Application.GetRealHeight(17), |
| | | TextColor = MusicColor.MusicNoTxetColor, |
| | | TextSize = TextSize.Text12, |
| | |
| | | System.Threading.Thread updateVolumeThread; |
| | | public void UpdateVolume() |
| | | { |
| | | if (updateVolumeThread != null) { |
| | | if (updateVolumeThread != null) |
| | | { |
| | | try |
| | | { |
| | | if (updateVolumeThread.IsAlive) { |
| | | if (updateVolumeThread.IsAlive) |
| | | { |
| | | updateVolumeThread.Abort(); |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | else if(if_volume == "Volume") |
| | | else if (if_volume == "Volume") |
| | | { |
| | | if (currVolumePlay == null) |
| | | { |