Fix bindable changes

This commit is contained in:
Dean Herbert
2019-03-02 13:40:43 +09:00
parent 796f6c3092
commit 389632d932
21 changed files with 96 additions and 94 deletions

View File

@ -2,7 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
@ -12,13 +12,12 @@ namespace osu.Game.Tournament.Components
{
public new Bindable<DateTimeOffset> Bindable
{
get { return bindable; }
get => bindable;
set
{
bindable = value;
bindable.BindValueChanged(dto =>
base.Bindable.Value = dto.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ"), true);
base.Bindable.Value = dto.NewValue.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ"), true);
}
}

View File

@ -3,7 +3,7 @@
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Game.Online.Chat;
using osu.Game.Overlays.Chat;
using osu.Game.Tournament.IPC;
@ -25,12 +25,12 @@ namespace osu.Game.Tournament.Components
if (ipc != null)
{
chatChannel.BindTo(ipc.ChatChannel);
chatChannel.BindValueChanged(channelString =>
chatChannel.BindValueChanged(c =>
{
if (string.IsNullOrWhiteSpace(channelString))
if (string.IsNullOrWhiteSpace(c.NewValue))
return;
int id = int.Parse(channelString);
int id = int.Parse(c.NewValue);
if (id <= 0) return;

View File

@ -6,7 +6,7 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -148,9 +148,9 @@ namespace osu.Game.Tournament.Components
});
}
private void matchChanged(MatchPairing match)
private void matchChanged(ValueChangedEvent<MatchPairing> pairing)
{
match.PicksBans.CollectionChanged += picksBansOnCollectionChanged;
pairing.NewValue.PicksBans.CollectionChanged += picksBansOnCollectionChanged;
updateState();
}