Exemple #1
0
        private void loadNewPanel(BeatmapInfo beatmap)
        {
            loadCancellation?.Cancel();
            request?.Cancel();

            panel?.FadeOut(200);
            panel?.Expire();
            panel = null;

            if (beatmap?.OnlineBeatmapID == null)
            {
                return;
            }

            loadCancellation = new CancellationTokenSource();

            request          = new GetBeatmapSetRequest(beatmap.OnlineBeatmapID.Value, BeatmapSetLookupType.BeatmapId);
            request.Success += res => Schedule(() =>
            {
                panel = new DirectGridPanel(res.ToBeatmapSet(rulesets));
                LoadComponentAsync(panel, AddInternal, loadCancellation.Token);
            });

            api.Queue(request);
        }
Exemple #2
0
 private void clearDisplay()
 {
     watchButton.Enabled.Value = false;
     onlineBeatmapRequest?.Cancel();
     beatmapPanelContainer.Clear();
     previewTrackManager.StopAnyPlaying(this);
 }