protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); Ruleset.UnbindAll(); SelectedMods.UnbindAll(); }
internal override void UnbindAllInternal() { base.UnbindAllInternal(); // optimisation to ensure cleanup happens aggressively. // without this, the central parameters bindable's internal WeakList can balloon out of control due to the // weak reference cleanup only occurring on Value retrieval (which rarely/never happens in this case). parameters?.UnbindAll(); }
public void SetContent(DifficultyIconTooltipContent content) { difficultyName.Text = content.BeatmapInfo.DifficultyName; starDifficulty.UnbindAll(); starDifficulty.BindTo(content.Difficulty); starDifficulty.BindValueChanged(difficulty => { starRating.Text = $"{difficulty.NewValue.Stars:0.##}"; difficultyFlow.Colour = colours.ForStarDifficulty(difficulty.NewValue.Stars); }, true); }
protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); if (spectatorClient != null) { foreach (var(userId, _) in userMap) { spectatorClient.StopWatchingUser(userId); } } managerUpdated?.UnbindAll(); }
protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); if (spectatorStreaming != null) { spectatorStreaming.OnUserBeganPlaying -= userBeganPlaying; spectatorStreaming.OnUserFinishedPlaying -= userFinishedPlaying; spectatorStreaming.OnNewFrames -= userSentFrames; spectatorStreaming.StopWatchingUser(targetUser.Id); } managerUpdated?.UnbindAll(); }
protected override void OnApply() { base.OnApply(); TextBindable.BindTo(HitObject.TextBindable); AlternativeTextBindable.BindTo(HitObject.AlternativeTextBindable); DisplayBindable.BindTo(HitObject.DisplayBindable); ToneBindable.BindTo(HitObject.ToneBindable); if (HitObject.ParentLyric != null) { HitObject.ParentLyricBindable.BindValueChanged(x => { SingersBindable.UnbindAll(); SingersBindable.BindTo(x.NewValue.SingersBindable); }, true); } }
public bool SetContent(object content) { if (!(content is DifficultyIconTooltipContent iconContent)) { return(false); } difficultyName.Text = iconContent.Beatmap.Version; starDifficulty.UnbindAll(); starDifficulty.BindTo(iconContent.Difficulty); starDifficulty.BindValueChanged(difficulty => { starRating.Text = $"{difficulty.NewValue.Stars:0.##}"; difficultyFlow.Colour = colours.ForDifficultyRating(difficulty.NewValue.DifficultyRating, true); }, true); return(true); }
protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); if (spectatorClient != null) { spectatorClient.OnUserBeganPlaying -= userBeganPlaying; spectatorClient.OnUserFinishedPlaying -= userFinishedPlaying; spectatorClient.OnNewFrames -= userSentFrames; lock (stateLock) { foreach (var(userId, _) in userMap) { spectatorClient.StopWatchingUser(userId); } } } managerUpdated?.UnbindAll(); }
public void Dispose() { apiState.UnbindAll(); cancelExistingConnect(); }