private async void PlaySoundsSimultaneouslyFlyoutItem_Click(object sender, RoutedEventArgs e) { bool oldPlayOneSoundAtOnce = FileManager.itemViewHolder.PlayOneSoundAtOnce; FileManager.itemViewHolder.PlayOneSoundAtOnce = false; foreach (Sound sound in FileManager.itemViewHolder.SelectedSounds) { await SoundPage.PlaySoundAsync(sound); } FileManager.itemViewHolder.PlayOneSoundAtOnce = oldPlayOneSoundAtOnce; }
private async void PlaySoundsSuccessivelyContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { List <Sound> sounds = ContentDialogs.SoundsList.ToList(); bool randomly = (bool)ContentDialogs.RandomCheckBox.IsChecked; int rounds = int.MaxValue; if (ContentDialogs.RepeatsComboBox.SelectedItem != ContentDialogs.RepeatsComboBox.Items.Last()) { int.TryParse(ContentDialogs.RepeatsComboBox.SelectedValue.ToString(), out rounds); } await SoundPage.PlaySoundsAsync(sounds, rounds, randomly); }