| | |
| | | /// </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) |
| | | { |
| | | 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, |
| | | }; |
| | | 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) => |
| | |
| | | /// </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) |
| | | { |
| | | 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, |
| | | }; |
| | | 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) => |
| | |
| | | }; |
| | | topFra.AddChidren(confirmBtn); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler= (sen,e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sen, e) => |
| | | { |
| | | volumedialog.Close(); |
| | | if (updateVolumeThread != null) |
| | | { |
| | |
| | | System.Threading.Thread updateVolumeThread; |
| | | public void UpdateVolume() |
| | | { |
| | | if (updateVolumeThread != null) { |
| | | if (updateVolumeThread != null) |
| | | { |
| | | try |
| | | { |
| | | if (updateVolumeThread.IsAlive) { |
| | | if (updateVolumeThread.IsAlive) |
| | | { |
| | | updateVolumeThread.Abort(); |
| | | } |
| | | } |