示例#1
0
        private async void StartButton_Clicked(object sender, EventArgs e)
        {
            AlbumViewModel albumViewModel = new AlbumViewModel();

            albumViewModel.ApplyFilters = false;
            bool success = albumViewModel.ChooseRandomAlbum();

            if (success)
            {
                AlbumPage albumPage = new AlbumPage(albumViewModel, false);
                await Navigation.PushModalAsync(albumPage);
            }
        }
示例#2
0
 private async void startButton_Clicked(object sender, EventArgs e)
 {
     AlbumViewModel albumViewModel = new AlbumViewModel();
     albumViewModel.ApplyFilters = true;
     albumViewModel.SelectedDayOrNight = dayNightPicker.SelectedIndex;
     albumViewModel.SelectedGenre = genresPicker.SelectedIndex;
     albumViewModel.SelectedMood = moodPicker.SelectedIndex;
     bool success = albumViewModel.ChooseRandomAlbum();
     if (success)
         await Navigation.PushModalAsync(new AlbumPage(albumViewModel, true));
     else
         await DisplayAlert("No items", "The are no matching items", "OK");
 }
        private void anotherAlbumButton_Click(object sender, RoutedEventArgs e)
        {
            AlbumViewModel albumViewModel = new AlbumViewModel();

            albumViewModel.ApplyFilters = filters;
            bool success = albumViewModel.ChooseRandomAlbum();

            if (success)
            {
                RandomAlbumWindow randomAlbumWindow = new RandomAlbumWindow(albumViewModel, filters);
                randomAlbumWindow.Show();
                this.Close();
            }
        }
        private void randomButton_Click(object sender, RoutedEventArgs e)
        {
            AlbumViewModel albumViewModel = new AlbumViewModel();
            bool           filters        = (bool)applyFiltersCheckbox.IsChecked;

            albumViewModel.ApplyFilters = filters;
            bool success = albumViewModel.ChooseRandomAlbum();

            if (success)
            {
                RandomAlbumWindow randomAlbumWindow = new RandomAlbumWindow(albumViewModel, filters);
                randomAlbumWindow.Show();
            }
        }
示例#5
0
        private async void NewRandomButton_Clicked(object sender, EventArgs e)
        {
            AlbumViewModel albumViewModel = new AlbumViewModel();

            albumViewModel.ApplyFilters = filters;
            if (filters)
            {
                albumViewModel.SelectedDayOrNight = viewModel.SelectedDayOrNight;
                albumViewModel.SelectedGenre      = viewModel.SelectedGenre;
                albumViewModel.SelectedMood       = viewModel.SelectedMood;
            }
            bool success = albumViewModel.ChooseRandomAlbum();

            if (success)
            {
                AlbumPage albumPage = new AlbumPage(albumViewModel, filters);
                await Navigation.PushModalAsync(albumPage);
            }
        }