private void load() { ParticipantCount.BindValueChanged(_ => setParticipantCount()); MaxParticipants.BindValueChanged(_ => setParticipantCount()); setParticipantCount(); }
private void load() { OsuSpriteText count; InternalChild = new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, LayoutDuration = transition_duration, Children = new[] { count = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.Bold, size: text_size) }, slash = new OsuSpriteText { Text = @"/", Font = OsuFont.GetFont(weight: FontWeight.Light, size: text_size) }, maxText = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.Light, size: text_size) }, } }; MaxParticipants.BindValueChanged(_ => updateMax(), true); ParticipantCount.BindValueChanged(c => count.Text = c.NewValue.ToString("#,0"), true); }
private void load() { OsuSpriteText count; InternalChild = new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, LayoutDuration = transition_duration, Children = new[] { count = new OsuSpriteText { TextSize = text_size, Font = @"Exo2.0-Bold" }, slash = new OsuSpriteText { Text = @"/", TextSize = text_size, Font = @"Exo2.0-Light" }, maxText = new OsuSpriteText { TextSize = text_size, Font = @"Exo2.0-Light" }, } }; MaxParticipants.BindValueChanged(_ => updateMax(), true); ParticipantCount.BindValueChanged(v => count.Text = v.ToString("#,0"), true); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (EnableTurn != null) { p.Add(new KeyValuePair <string, string>("EnableTurn", EnableTurn.Value.ToString().ToLower())); } if (Type != null) { p.Add(new KeyValuePair <string, string>("Type", Type.ToString())); } if (UniqueName != null) { p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName)); } if (StatusCallback != null) { p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback))); } if (StatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString())); } if (MaxParticipants != null) { p.Add(new KeyValuePair <string, string>("MaxParticipants", MaxParticipants.ToString())); } if (RecordParticipantsOnConnect != null) { p.Add(new KeyValuePair <string, string>("RecordParticipantsOnConnect", RecordParticipantsOnConnect.Value.ToString().ToLower())); } if (VideoCodecs != null) { p.AddRange(VideoCodecs.Select(prop => new KeyValuePair <string, string>("VideoCodecs", prop.ToString()))); } if (MediaRegion != null) { p.Add(new KeyValuePair <string, string>("MediaRegion", MediaRegion)); } return(p); }
private void load(OsuColour colours) { InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4Extensions.FromHex(@"28242d"), }, new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), }, Content = new[] { new Drawable[] { new OsuScrollContainer { Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, Children = new[] { new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Children = new Drawable[] { new Container { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Horizontal = WaveOverlayContainer.WIDTH_PADDING }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SectionContainer { Padding = new MarginPadding { Right = FIELD_PADDING / 2 }, Children = new[] { new Section("Room name") { Child = NameField = new SettingsTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, }, }, new Section("Room visibility") { Alpha = disabled_alpha, Child = AvailabilityPicker = new RoomAvailabilityPicker { Enabled = { Value = false } }, }, new Section("Game type") { Child = new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, Spacing = new Vector2(7), Children = new Drawable[] { TypePicker = new MatchTypePicker { RelativeSizeAxes = Axes.X, }, typeLabel = new OsuSpriteText { Font = OsuFont.GetFont(size: 14), Colour = colours.Yellow }, }, }, }, }, }, new SectionContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Left = FIELD_PADDING / 2 }, Children = new[] { new Section("Max participants") { Alpha = disabled_alpha, Child = MaxParticipantsField = new SettingsNumberTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, new Section("Password (optional)") { Child = PasswordTextBox = new SettingsPasswordTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, }, }, } } }, }, initialBeatmapControl = new BeatmapSelectionControl { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.X, Width = 0.5f } } } }, }, }, new Drawable[] { new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Y = 2, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4Extensions.FromHex(@"28242d").Darken(0.5f).Opacity(1f), }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateOrUpdateButton { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Size = new Vector2(230, 55), Enabled = { Value = false }, Action = apply, }, ErrorText = new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Alpha = 0, Depth = 1, Colour = colours.RedDark } } } } } } } }, loadingLayer = new LoadingLayer(true) }; TypePicker.Current.BindValueChanged(type => typeLabel.Text = type.NewValue.GetLocalisableDescription(), true); RoomName.BindValueChanged(name => NameField.Text = name.NewValue, true); Availability.BindValueChanged(availability => AvailabilityPicker.Current.Value = availability.NewValue, true); Type.BindValueChanged(type => TypePicker.Current.Value = type.NewValue, true); MaxParticipants.BindValueChanged(count => MaxParticipantsField.Text = count.NewValue?.ToString(), true); RoomID.BindValueChanged(roomId => initialBeatmapControl.Alpha = roomId.NewValue == null ? 1 : 0, true); Password.BindValueChanged(password => PasswordTextBox.Text = password.NewValue ?? string.Empty, true); operationInProgress.BindTo(ongoingOperationTracker.InProgress); operationInProgress.BindValueChanged(v => { if (v.NewValue) { loadingLayer.Show(); } else { loadingLayer.Hide(); } }); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (From != null) { p.Add(new KeyValuePair <string, string>("From", From.ToString())); } if (To != null) { p.Add(new KeyValuePair <string, string>("To", To.ToString())); } if (StatusCallback != null) { p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback))); } if (StatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString())); } if (StatusCallbackEvent != null) { p.AddRange(StatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("StatusCallbackEvent", prop))); } if (Label != null) { p.Add(new KeyValuePair <string, string>("Label", Label)); } if (Timeout != null) { p.Add(new KeyValuePair <string, string>("Timeout", Timeout.ToString())); } if (Record != null) { p.Add(new KeyValuePair <string, string>("Record", Record.Value.ToString().ToLower())); } if (Muted != null) { p.Add(new KeyValuePair <string, string>("Muted", Muted.Value.ToString().ToLower())); } if (Beep != null) { p.Add(new KeyValuePair <string, string>("Beep", Beep)); } if (StartConferenceOnEnter != null) { p.Add(new KeyValuePair <string, string>("StartConferenceOnEnter", StartConferenceOnEnter.Value.ToString().ToLower())); } if (EndConferenceOnExit != null) { p.Add(new KeyValuePair <string, string>("EndConferenceOnExit", EndConferenceOnExit.Value.ToString().ToLower())); } if (WaitUrl != null) { p.Add(new KeyValuePair <string, string>("WaitUrl", Serializers.Url(WaitUrl))); } if (WaitMethod != null) { p.Add(new KeyValuePair <string, string>("WaitMethod", WaitMethod.ToString())); } if (EarlyMedia != null) { p.Add(new KeyValuePair <string, string>("EarlyMedia", EarlyMedia.Value.ToString().ToLower())); } if (MaxParticipants != null) { p.Add(new KeyValuePair <string, string>("MaxParticipants", MaxParticipants.ToString())); } if (ConferenceRecord != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecord", ConferenceRecord)); } if (ConferenceTrim != null) { p.Add(new KeyValuePair <string, string>("ConferenceTrim", ConferenceTrim)); } if (ConferenceStatusCallback != null) { p.Add(new KeyValuePair <string, string>("ConferenceStatusCallback", Serializers.Url(ConferenceStatusCallback))); } if (ConferenceStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("ConferenceStatusCallbackMethod", ConferenceStatusCallbackMethod.ToString())); } if (ConferenceStatusCallbackEvent != null) { p.AddRange(ConferenceStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("ConferenceStatusCallbackEvent", prop))); } if (RecordingChannels != null) { p.Add(new KeyValuePair <string, string>("RecordingChannels", RecordingChannels)); } if (RecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallback", Serializers.Url(RecordingStatusCallback))); } if (RecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallbackMethod", RecordingStatusCallbackMethod.ToString())); } if (SipAuthUsername != null) { p.Add(new KeyValuePair <string, string>("SipAuthUsername", SipAuthUsername)); } if (SipAuthPassword != null) { p.Add(new KeyValuePair <string, string>("SipAuthPassword", SipAuthPassword)); } if (Region != null) { p.Add(new KeyValuePair <string, string>("Region", Region)); } if (ConferenceRecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecordingStatusCallback", Serializers.Url(ConferenceRecordingStatusCallback))); } if (ConferenceRecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecordingStatusCallbackMethod", ConferenceRecordingStatusCallbackMethod.ToString())); } if (RecordingStatusCallbackEvent != null) { p.AddRange(RecordingStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("RecordingStatusCallbackEvent", prop))); } if (ConferenceRecordingStatusCallbackEvent != null) { p.AddRange(ConferenceRecordingStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("ConferenceRecordingStatusCallbackEvent", prop))); } if (Coaching != null) { p.Add(new KeyValuePair <string, string>("Coaching", Coaching.Value.ToString().ToLower())); } if (CallSidToCoach != null) { p.Add(new KeyValuePair <string, string>("CallSidToCoach", CallSidToCoach.ToString())); } if (JitterBufferSize != null) { p.Add(new KeyValuePair <string, string>("JitterBufferSize", JitterBufferSize)); } if (Byoc != null) { p.Add(new KeyValuePair <string, string>("Byoc", Byoc.ToString())); } if (CallerId != null) { p.Add(new KeyValuePair <string, string>("CallerId", CallerId)); } if (CallReason != null) { p.Add(new KeyValuePair <string, string>("CallReason", CallReason)); } return(p); }
private void load(OverlayColourProvider colourProvider, OsuColour colours) { InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background4 }, new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), }, Content = new[] { new Drawable[] { new OsuScrollContainer { Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, Children = new[] { new Container { Padding = new MarginPadding { Horizontal = WaveOverlayContainer.WIDTH_PADDING }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SectionContainer { Padding = new MarginPadding { Right = FIELD_PADDING / 2 }, Children = new[] { new Section("Room name") { Child = NameField = new OsuTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, LengthLimit = 100 }, }, new Section("Duration") { Child = DurationField = new DurationDropdown { RelativeSizeAxes = Axes.X, Items = new[] { TimeSpan.FromMinutes(30), TimeSpan.FromHours(1), TimeSpan.FromHours(2), TimeSpan.FromHours(4), TimeSpan.FromHours(8), TimeSpan.FromHours(12), //TimeSpan.FromHours(16), TimeSpan.FromHours(24), TimeSpan.FromDays(3), TimeSpan.FromDays(7) } } }, new Section("Allowed attempts (across all playlist items)") { Child = MaxAttemptsField = new OsuNumberBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, PlaceholderText = "Unlimited", }, }, new Section("Room visibility") { Alpha = disabled_alpha, Child = AvailabilityPicker = new RoomAvailabilityPicker { Enabled = { Value = false } }, }, new Section("Max participants") { Alpha = disabled_alpha, Child = MaxParticipantsField = new OsuNumberBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, new Section("Password (optional)") { Alpha = disabled_alpha, Child = new OsuPasswordTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, }, }, new SectionContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Left = FIELD_PADDING / 2 }, Children = new[] { new Section("Playlist") { Child = new GridContainer { RelativeSizeAxes = Axes.X, Height = 448, Content = new[] { new Drawable[] { playlist = new DrawableRoomPlaylist(true, true) { RelativeSizeAxes = Axes.Both } }, new Drawable[] { playlistLength = new OsuSpriteText { Margin = new MarginPadding { Vertical = 5 }, Colour = colours.Yellow, Font = OsuFont.GetFont(size: 12), } }, new Drawable[] { editPlaylistButton = new PurpleTriangleButton { RelativeSizeAxes = Axes.X, Height = 40, Text = "Edit playlist", Action = () => EditPlaylist?.Invoke() } } }, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize), } } }, }, }, }, } }, }, }, new Drawable[] { new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Y = 2, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background5 }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateRoomButton { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Size = new Vector2(230, 55), Enabled = { Value = false }, Action = apply, }, ErrorText = new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Alpha = 0, Depth = 1, Colour = colours.RedDark } } } } } } } }, loadingLayer = new LoadingLayer(true) }; RoomName.BindValueChanged(name => NameField.Text = name.NewValue, true); Availability.BindValueChanged(availability => AvailabilityPicker.Current.Value = availability.NewValue, true); MaxParticipants.BindValueChanged(count => MaxParticipantsField.Text = count.NewValue?.ToString(), true); MaxAttempts.BindValueChanged(count => MaxAttemptsField.Text = count.NewValue?.ToString(), true); Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue ?? TimeSpan.FromMinutes(30), true); playlist.Items.BindTo(Playlist); Playlist.BindCollectionChanged(onPlaylistChanged, true); }
private void load(OsuColour colours) { Container dimContent; InternalChildren = new Drawable[] { dimContent = new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4Extensions.FromHex(@"28242d"), }, new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(GridSizeMode.Distributed), new Dimension(GridSizeMode.AutoSize), }, Content = new[] { new Drawable[] { new OsuScrollContainer { Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, Children = new[] { new Container { Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SectionContainer { Padding = new MarginPadding { Right = field_padding / 2 }, Children = new[] { new Section("Room name") { Child = NameField = new SettingsTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, }, }, new Section("Duration") { Child = DurationField = new DurationDropdown { RelativeSizeAxes = Axes.X, Items = new[] { TimeSpan.FromMinutes(30), TimeSpan.FromHours(1), TimeSpan.FromHours(2), TimeSpan.FromHours(4), TimeSpan.FromHours(8), TimeSpan.FromHours(12), //TimeSpan.FromHours(16), TimeSpan.FromHours(24), TimeSpan.FromDays(3), TimeSpan.FromDays(7) } } }, new Section("Room visibility") { Alpha = disabled_alpha, Child = AvailabilityPicker = new RoomAvailabilityPicker { Enabled = { Value = false } }, }, new Section("Game type") { Alpha = disabled_alpha, Child = new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, Spacing = new Vector2(7), Children = new Drawable[] { TypePicker = new GameTypePicker { RelativeSizeAxes = Axes.X, Enabled = { Value = false } }, typeLabel = new OsuSpriteText { Font = OsuFont.GetFont(size: 14), Colour = colours.Yellow }, }, }, }, new Section("Max participants") { Alpha = disabled_alpha, Child = MaxParticipantsField = new SettingsNumberTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, new Section("Password (optional)") { Alpha = disabled_alpha, Child = new SettingsPasswordTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, }, }, new SectionContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Left = field_padding / 2 }, Children = new[] { new Section("Playlist") { Child = new GridContainer { RelativeSizeAxes = Axes.X, Height = 300, Content = new[] { new Drawable[] { playlist = new DrawableRoomPlaylist(true, true) { RelativeSizeAxes = Axes.Both } }, new Drawable[] { new PurpleTriangleButton { RelativeSizeAxes = Axes.X, Height = 40, Text = "Edit playlist", Action = () => EditPlaylist?.Invoke() } } }, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), } } }, }, }, }, } }, }, }, new Drawable[] { new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Y = 2, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4Extensions.FromHex(@"28242d").Darken(0.5f).Opacity(1f), }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateRoomButton { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Size = new Vector2(230, 55), Enabled = { Value = false }, Action = apply, }, ErrorText = new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Alpha = 0, Depth = 1, Colour = colours.RedDark } } } } } } } }, } }, loadingLayer = new LoadingLayer(dimContent) }; TypePicker.Current.BindValueChanged(type => typeLabel.Text = type.NewValue?.Name ?? string.Empty, true); RoomName.BindValueChanged(name => NameField.Text = name.NewValue, true); Availability.BindValueChanged(availability => AvailabilityPicker.Current.Value = availability.NewValue, true); Type.BindValueChanged(type => TypePicker.Current.Value = type.NewValue, true); MaxParticipants.BindValueChanged(count => MaxParticipantsField.Text = count.NewValue?.ToString(), true); Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue, true); playlist.Items.BindTo(Playlist); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (ReservationStatus != null) { p.Add(new KeyValuePair <string, string>("ReservationStatus", ReservationStatus.ToString())); } if (WorkerActivitySid != null) { p.Add(new KeyValuePair <string, string>("WorkerActivitySid", WorkerActivitySid.ToString())); } if (Instruction != null) { p.Add(new KeyValuePair <string, string>("Instruction", Instruction)); } if (DequeuePostWorkActivitySid != null) { p.Add(new KeyValuePair <string, string>("DequeuePostWorkActivitySid", DequeuePostWorkActivitySid.ToString())); } if (DequeueFrom != null) { p.Add(new KeyValuePair <string, string>("DequeueFrom", DequeueFrom)); } if (DequeueRecord != null) { p.Add(new KeyValuePair <string, string>("DequeueRecord", DequeueRecord)); } if (DequeueTimeout != null) { p.Add(new KeyValuePair <string, string>("DequeueTimeout", DequeueTimeout.ToString())); } if (DequeueTo != null) { p.Add(new KeyValuePair <string, string>("DequeueTo", DequeueTo)); } if (DequeueStatusCallbackUrl != null) { p.Add(new KeyValuePair <string, string>("DequeueStatusCallbackUrl", Serializers.Url(DequeueStatusCallbackUrl))); } if (CallFrom != null) { p.Add(new KeyValuePair <string, string>("CallFrom", CallFrom)); } if (CallRecord != null) { p.Add(new KeyValuePair <string, string>("CallRecord", CallRecord)); } if (CallTimeout != null) { p.Add(new KeyValuePair <string, string>("CallTimeout", CallTimeout.ToString())); } if (CallTo != null) { p.Add(new KeyValuePair <string, string>("CallTo", CallTo)); } if (CallUrl != null) { p.Add(new KeyValuePair <string, string>("CallUrl", Serializers.Url(CallUrl))); } if (CallStatusCallbackUrl != null) { p.Add(new KeyValuePair <string, string>("CallStatusCallbackUrl", Serializers.Url(CallStatusCallbackUrl))); } if (CallAccept != null) { p.Add(new KeyValuePair <string, string>("CallAccept", CallAccept.Value.ToString().ToLower())); } if (RedirectCallSid != null) { p.Add(new KeyValuePair <string, string>("RedirectCallSid", RedirectCallSid.ToString())); } if (RedirectAccept != null) { p.Add(new KeyValuePair <string, string>("RedirectAccept", RedirectAccept.Value.ToString().ToLower())); } if (RedirectUrl != null) { p.Add(new KeyValuePair <string, string>("RedirectUrl", Serializers.Url(RedirectUrl))); } if (To != null) { p.Add(new KeyValuePair <string, string>("To", To)); } if (From != null) { p.Add(new KeyValuePair <string, string>("From", From)); } if (StatusCallback != null) { p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback))); } if (StatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString())); } if (StatusCallbackEvent != null) { p.AddRange(StatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("StatusCallbackEvent", prop.ToString()))); } if (Timeout != null) { p.Add(new KeyValuePair <string, string>("Timeout", Timeout.ToString())); } if (Record != null) { p.Add(new KeyValuePair <string, string>("Record", Record.Value.ToString().ToLower())); } if (Muted != null) { p.Add(new KeyValuePair <string, string>("Muted", Muted.Value.ToString().ToLower())); } if (Beep != null) { p.Add(new KeyValuePair <string, string>("Beep", Beep)); } if (StartConferenceOnEnter != null) { p.Add(new KeyValuePair <string, string>("StartConferenceOnEnter", StartConferenceOnEnter.Value.ToString().ToLower())); } if (EndConferenceOnExit != null) { p.Add(new KeyValuePair <string, string>("EndConferenceOnExit", EndConferenceOnExit.Value.ToString().ToLower())); } if (WaitUrl != null) { p.Add(new KeyValuePair <string, string>("WaitUrl", Serializers.Url(WaitUrl))); } if (WaitMethod != null) { p.Add(new KeyValuePair <string, string>("WaitMethod", WaitMethod.ToString())); } if (EarlyMedia != null) { p.Add(new KeyValuePair <string, string>("EarlyMedia", EarlyMedia.Value.ToString().ToLower())); } if (MaxParticipants != null) { p.Add(new KeyValuePair <string, string>("MaxParticipants", MaxParticipants.ToString())); } if (ConferenceStatusCallback != null) { p.Add(new KeyValuePair <string, string>("ConferenceStatusCallback", Serializers.Url(ConferenceStatusCallback))); } if (ConferenceStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("ConferenceStatusCallbackMethod", ConferenceStatusCallbackMethod.ToString())); } if (ConferenceStatusCallbackEvent != null) { p.AddRange(ConferenceStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("ConferenceStatusCallbackEvent", prop.ToString()))); } if (ConferenceRecord != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecord", ConferenceRecord)); } if (ConferenceTrim != null) { p.Add(new KeyValuePair <string, string>("ConferenceTrim", ConferenceTrim)); } if (RecordingChannels != null) { p.Add(new KeyValuePair <string, string>("RecordingChannels", RecordingChannels)); } if (RecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallback", Serializers.Url(RecordingStatusCallback))); } if (RecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallbackMethod", RecordingStatusCallbackMethod.ToString())); } if (ConferenceRecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecordingStatusCallback", Serializers.Url(ConferenceRecordingStatusCallback))); } if (ConferenceRecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("ConferenceRecordingStatusCallbackMethod", ConferenceRecordingStatusCallbackMethod.ToString())); } if (Region != null) { p.Add(new KeyValuePair <string, string>("Region", Region)); } if (SipAuthUsername != null) { p.Add(new KeyValuePair <string, string>("SipAuthUsername", SipAuthUsername)); } if (SipAuthPassword != null) { p.Add(new KeyValuePair <string, string>("SipAuthPassword", SipAuthPassword)); } if (DequeueStatusCallbackEvent != null) { p.AddRange(DequeueStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("DequeueStatusCallbackEvent", prop))); } if (PostWorkActivitySid != null) { p.Add(new KeyValuePair <string, string>("PostWorkActivitySid", PostWorkActivitySid.ToString())); } if (EndConferenceOnCustomerExit != null) { p.Add(new KeyValuePair <string, string>("EndConferenceOnCustomerExit", EndConferenceOnCustomerExit.Value.ToString().ToLower())); } if (BeepOnCustomerEntrance != null) { p.Add(new KeyValuePair <string, string>("BeepOnCustomerEntrance", BeepOnCustomerEntrance.Value.ToString().ToLower())); } return(p); }
private void load(OverlayColourProvider colourProvider, OsuColour colours) { InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background4 }, new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize), }, Content = new[] { new Drawable[] { new OsuScrollContainer { Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, Children = new[] { new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Children = new[] { new Container { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Padding = new MarginPadding { Horizontal = WaveOverlayContainer.WIDTH_PADDING }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SectionContainer { Padding = new MarginPadding { Right = FIELD_PADDING / 2 }, Children = new[] { new Section("Room name") { Child = NameField = new OsuTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, LengthLimit = 100, }, }, // new Section("Room visibility") // { // Alpha = disabled_alpha, // Child = AvailabilityPicker = new RoomAvailabilityPicker // { // Enabled = { Value = false } // }, // }, new Section("Game type") { Child = new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, Spacing = new Vector2(7), Children = new Drawable[] { TypePicker = new MatchTypePicker { RelativeSizeAxes = Axes.X, }, typeLabel = new OsuSpriteText { Font = OsuFont.GetFont(size: 14), Colour = colours.Yellow }, }, }, }, new Section("Queue mode") { Child = new Container { RelativeSizeAxes = Axes.X, Height = 40, Child = QueueModeDropdown = new OsuEnumDropdown <QueueMode> { RelativeSizeAxes = Axes.X } } }, new Section("Auto start") { Child = new Container { RelativeSizeAxes = Axes.X, Height = 40, Child = startModeDropdown = new OsuEnumDropdown <StartMode> { RelativeSizeAxes = Axes.X } } } }, }, new SectionContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Left = FIELD_PADDING / 2 }, Children = new[] { new Section("Max participants") { Alpha = disabled_alpha, Child = MaxParticipantsField = new OsuNumberBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, }, }, new Section("Password (optional)") { Child = PasswordTextBox = new OsuPasswordTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, LengthLimit = 255, }, }, } } }, }, playlistContainer = new FillFlowContainer { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Width = 0.5f, Depth = float.MaxValue, Spacing = new Vector2(5), Children = new Drawable[] { drawablePlaylist = new DrawableRoomPlaylist { RelativeSizeAxes = Axes.X, Height = DrawableRoomPlaylistItem.HEIGHT }, new PurpleTriangleButton { RelativeSizeAxes = Axes.X, Height = 40, Text = "Select beatmap", Action = SelectBeatmap } } } } } }, }, }, new Drawable[] { new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Y = 2, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background5 }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateOrUpdateButton { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Size = new Vector2(230, 55), Enabled = { Value = false }, Action = apply, }, ErrorText = new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Alpha = 0, Depth = 1, Colour = colours.RedDark } } } } } } } }, loadingLayer = new LoadingLayer(true) }; TypePicker.Current.BindValueChanged(type => typeLabel.Text = type.NewValue.GetLocalisableDescription(), true); RoomName.BindValueChanged(name => NameField.Text = name.NewValue, true); Type.BindValueChanged(type => TypePicker.Current.Value = type.NewValue, true); MaxParticipants.BindValueChanged(count => MaxParticipantsField.Text = count.NewValue?.ToString(), true); RoomID.BindValueChanged(roomId => playlistContainer.Alpha = roomId.NewValue == null ? 1 : 0, true); Password.BindValueChanged(password => PasswordTextBox.Text = password.NewValue ?? string.Empty, true); QueueMode.BindValueChanged(mode => QueueModeDropdown.Current.Value = mode.NewValue, true); AutoStartDuration.BindValueChanged(duration => startModeDropdown.Current.Value = (StartMode)(int)duration.NewValue.TotalSeconds, true); operationInProgress.BindTo(ongoingOperationTracker.InProgress); operationInProgress.BindValueChanged(v => { if (v.NewValue) { loadingLayer.Show(); } else { loadingLayer.Hide(); } }); }
private void load(OsuColour colours) { InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex(@"28242d"), }, new GridContainer { RelativeSizeAxes = Axes.Both, RowDimensions = new[] { new Dimension(GridSizeMode.Distributed), new Dimension(GridSizeMode.AutoSize), }, Content = new[] { new Drawable[] { new OsuScrollContainer { Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, Children = new[] { new Container { Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new SectionContainer { Padding = new MarginPadding { Right = field_padding / 2 }, Children = new[] { new Section("房间名") { Child = NameField = new SettingsTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, OnCommit = (sender, text) => apply(), }, }, new Section("房间可见性") { Alpha = disabled_alpha, Child = AvailabilityPicker = new RoomAvailabilityPicker { Enabled = { Value = false } }, }, new Section("游戏类型") { Alpha = disabled_alpha, Child = new FillFlowContainer { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, Spacing = new Vector2(7), Children = new Drawable[] { TypePicker = new GameTypePicker { RelativeSizeAxes = Axes.X, Enabled = { Value = false } }, typeLabel = new OsuSpriteText { Font = OsuFont.GetFont(size: 14), Colour = colours.Yellow }, }, }, }, }, }, new SectionContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Left = field_padding / 2 }, Children = new[] { new Section("最大人数") { Alpha = disabled_alpha, Child = MaxParticipantsField = new SettingsNumberTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, OnCommit = (sender, text) => apply() }, }, new Section("持续时间") { Child = DurationField = new DurationDropdown { RelativeSizeAxes = Axes.X, Items = new[] { TimeSpan.FromMinutes(30), TimeSpan.FromHours(1), TimeSpan.FromHours(2), TimeSpan.FromHours(4), TimeSpan.FromHours(8), TimeSpan.FromHours(12), //TimeSpan.FromHours(16), TimeSpan.FromHours(24), TimeSpan.FromDays(3), TimeSpan.FromDays(7) } } }, new Section("密码(可选)") { Alpha = disabled_alpha, Child = new SettingsPasswordTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, ReadOnly = true, OnCommit = (sender, text) => apply() }, }, }, }, }, } }, }, }, new Drawable[] { new Container { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Y = 2, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex(@"28242d").Darken(0.5f).Opacity(1f), }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateRoomButton { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Size = new Vector2(230, 55), Enabled = { Value = false }, Action = apply, }, ErrorText = new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Alpha = 0, Depth = 1, Colour = colours.RedDark } } } } } } } }, processingOverlay = new ProcessingOverlay { Alpha = 0 } }; TypePicker.Current.BindValueChanged(type => typeLabel.Text = type.NewValue?.Name ?? string.Empty, true); RoomName.BindValueChanged(name => NameField.Text = name.NewValue, true); Availability.BindValueChanged(availability => AvailabilityPicker.Current.Value = availability.NewValue, true); Type.BindValueChanged(type => TypePicker.Current.Value = type.NewValue, true); MaxParticipants.BindValueChanged(count => MaxParticipantsField.Text = count.NewValue?.ToString(), true); Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue, true); }
public void Init() { instance = new MaxParticipants(); }