Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }