public async void CreatePlaylistOnClick() { LoadLoggingScene(); ProcessedBeatmapNotifier.SendNotification("Beatmap processing started..."); await PlaylistCreator.CreateAllLists(this.beatmapCount, this.playlistSize, this.catType); ProcessedBeatmapNotifier.SendNotification("All beatmaps processed."); BeatmapLog.SaveLog(); ProcessedBeatmapNotifier.SendNotification("You can view all new beatmaps in the log."); }
private static async Task CreateAllPlaylistCreators(int count) => await Task.WhenAll(PlaylistCreator.CreateAllLists(count, 20, CatType.DateRanked), PlaylistCreator.CreateAllLists(count, 20, CatType.PlayCount), PlaylistCreator.CreateAllLists(count, 20, CatType.Difficulty), PlaylistCreator.CreateAllLists(count, 25, CatType.DateRanked), PlaylistCreator.CreateAllLists(count, 25, CatType.PlayCount), PlaylistCreator.CreateAllLists(count, 25, CatType.Difficulty), PlaylistCreator.CreateAllLists(count, 30, CatType.DateRanked), PlaylistCreator.CreateAllLists(count, 30, CatType.PlayCount), PlaylistCreator.CreateAllLists(count, 30, CatType.Difficulty), PlaylistCreator.CreateAllLists(count, 50, CatType.DateRanked), PlaylistCreator.CreateAllLists(count, 50, CatType.PlayCount), PlaylistCreator.CreateAllLists(count, 50, CatType.Difficulty), PlaylistCreator.CreateAllLists(count, count, CatType.DateRanked), PlaylistCreator.CreateAllLists(count, count, CatType.PlayCount), PlaylistCreator.CreateAllLists(count, count, CatType.Difficulty));
public AnimationsPanelViewModel(StoryboardRepository storyboardRepository, BitmapStoryboardCreator bitmapStoryboardCreator, BitmapRepository bitmapRepository) { _storyboardRepository = storyboardRepository; _bitmapStoryboardCreator = bitmapStoryboardCreator; _bitmapRepository = bitmapRepository; // Load storyboards animations List <Storyboard> storyboards = storyboardRepository.LoadStoryboards(); // Load bitmap animations storyboards.AddRange(_bitmapStoryboardCreator.Create()); // Create play lists List <IAnimation> animations = storyboards.Cast <IAnimation>().ToList(); animations.Add(PlaylistCreator.Create("All combined", storyboards, 120)); animations.AddRange(PlaylistCreator.CreateFromCategory(storyboards, 120)); var list = animations.Select(x => new AnimationPanelItemViewModel(x)).Select(vm => { vm.StartCommand.Subscribe(onNext => { StartAnimationRequested?.Invoke(this, vm.Animation); }); vm.SendToPad.Subscribe(onNext => { SendToPadRequested?.Invoke(this, new SendToPadEventArgs(vm.Animation, onNext)); }); return(vm); }).ToList(); _animationViewModels.AddRange(list); _animationViewModels.Connect().Bind(out var animationPanelItemViewModels).Subscribe(); Items = animationPanelItemViewModels; /*// TODO why is this not working? * this.WhenAnyValue(x => x.SelectedAnimation) * .Where(x=> x!=null) * .Select(x => new StoryboardDetailsControlViewModel(SelectedAnimation.Animation)) * .ToProperty(this, x=> x.StoryboardDetails);*/ }