async Task IHandleAsync <StartPlayingPlayListEventModel> .HandleAsync(StartPlayingPlayListEventModel message)
        {
            var model = cons !.Resolve <PlaylistSongProgressViewModel>();

            await LoadScreenAsync(model);

            //hopefully we don't need the playlist main anymore (?)



            //var model = new PlaylistSongProgressViewModel()
        }
예제 #2
0
        private async Task PlayChosenPlaylistAsync(int id)
        {
            if (await _logic.HasPlaylistCreatedAsync(id) == false)
            {
                await StartChoosingSongsAsync(id);

                return;
            }
            //this means can open the playlist.
            //var playlist = await _logic.GetPlayListMainAsync(id);
            await _logic.SetMainPlaylistAsync(id);

            var   model = new StartPlayingPlayListEventModel();
            await Aggregator !.PublishAsync(model);
        }
        public async Task ChooseSongsAsync()
        {
            if (SubLists.Count == 0)
            {
                throw new BasicBlankException("Can't have 0 songs.  Otherwise, rethinking is required");
            }
            int actuallyChosen = await _logic.ChooseSongsAsync(SubLists.First(), Percentage, HowManySongsWanted);

            SongsActuallyChosen += actuallyChosen;
            SubLists.RemoveFirstItem();
            if (SubLists.Count == 0)
            {
                await _logic.CreatePlaylistSongsAsync();

                var   model = new StartPlayingPlayListEventModel();
                await Aggregator !.PublishAsync(model);
                return;
            }
            ClearSelections();
            FocusOnFirst();
        }