void HandleSequencePopup(ButtonsPopupEvent message) { if (message.IsCanceled) { return; } if (message.SelectedButton == 1) { _eventAggregator.Publish(new NavigationExEvent() { NavDestination = NavDestination.Record, PageSettings = (vm) => { (vm as RecordSequenceViewModel).Song = Song; (vm as RecordSequenceViewModel).Difficulty = Difficulty; } }); } else { DebugHelpers.DebugSongHelper.GenerateSequence(new Random(), Song, Difficulty); NotifyOfPropertyChange(() => Song); } }
public void Handle(ButtonsPopupEvent message) { if (!IsActive) { return; } IsPopupShowing = false; if (message.IsCanceled) { ResumeGame(); return; } switch (message.SelectedButton) { case 1: ResumeGame(); break; case 2: PlayAgain(); break; case 3: ExitGame(); break; } }
void HandleExitPopup(ButtonsPopupEvent message) { if (message.IsCanceled) { ResumeRecord(); return; } switch (message.SelectedButton) { case 1: ResumeRecord(); break; case 2: RecordAgain(); break; case 3: Exit(); break; case 4: Song.Sequences.Remove(Difficulty); Exit(); break; } }
public void Handle(ButtonsPopupEvent message) { if (!IsActive) { return; } IsPopupShowing = false; if (message.PopupId == 1) { HandleExitPopup(message); } else if (message.PopupId == 2) { HandleSequencePopup(message); } }
void HandleMusicEndPopup(ButtonsPopupEvent message) { switch (message.SelectedButton) { case 1: Exit(); break; case 2: RecordAgain(); break; case 3: Song.Sequences.Remove(Difficulty); Exit(); break; } }
void HandleExitPopup(ButtonsPopupEvent message) { if (message.IsCanceled) { return; } if (message.SelectedButton == 2 && ValidateFields(true)) { Song song = new Song(); song.Artist = Song.Artist; song.Author = Song.Author; song.Title = Song.Title; song.Sequences = Song.Sequences; song.FilePath = Song.FilePath; song.BackgroundPath = Song.BackgroundPath; song.CoverPath = Song.CoverPath; song.CreateDate = DateTime.Now; song.Duration = Song.Duration; song.SaveToFile(); _songsService.AddSong(song); _eventAggregator.Publish(new NavigationEvent() { NavDestination = NavDestination.MainMenu }); } if (message.SelectedButton == 3) { _eventAggregator.Publish(new NavigationEvent() { NavDestination = NavDestination.MainMenu }); } }