Ejemplo n.º 1
0
        private async void BtnChangeInstrument_Click(object sender, RoutedEventArgs e)
        {
            this.AddOptionChangeFlag();

            await SongPagesHelper.AddMidiAsync().ConfigureAwait(true);

            _ = this.Frame.Navigate(typeof(InstrumentsPage), null, new DrillInNavigationTransitionInfo());
        }
Ejemplo n.º 2
0
 private void BtnUseSelectedSong_Click(object sender, RoutedEventArgs e)
 {
     UserData.Song = this.SongsListBox.SelectedValue.ToString();
     _             = SongPagesHelper.AddMidiAsync(this.sendTheSongToOtherPlayers).ConfigureAwait(true);
     this.lblReceivedSongName.Text           = Path.GetFileNameWithoutExtension(UserData.Song);
     this.lblReceivedSongName.Visibility     = Visibility.Visible;
     this.lblReceivedSongNameText.Visibility = Visibility.Visible;
     this.ShowOrHideSongSelection(false);
     this.btnStartMultiplayerGame.Visibility = Visibility.Visible;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// SetSongFromNetwork.
        /// </summary>
        /// <param name="args">MidiFileReceivedEventArguments.</param>
        private async void SetSongFromNetwork(MidiFileReceivedEventArguments args) => await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(
            CoreDispatcherPriority.Normal,
            async() =>
        {
            this.ShowOrHideSongSelection(false);
            this.lblReceivedSongName.Text           = Path.GetFileNameWithoutExtension(args.FilePath);
            this.lblReceivedSongName.Visibility     = Visibility.Visible;
            this.lblReceivedSongNameText.Visibility = Visibility.Visible;

            UserData.Song = args.FilePath;
            await SongPagesHelper.AddMidiAsync().ConfigureAwait(true);
            this.sendTheSongToOtherPlayers          = false;
            this.btnStartMultiplayerGame.Visibility = Visibility.Visible;
        });
Ejemplo n.º 4
0
        private async void NextButton_Click(object sender, RoutedEventArgs e)
        {
            this.ErrorBox.Text = string.Empty;
            var selectedValue = this.SongsListBox.SelectedValue;

            if (selectedValue != null)
            {
                UserData.Song = selectedValue.ToString();
                await SongPagesHelper.AddMidiAsync().ConfigureAwait(true);

                _ = this.Frame.Navigate(typeof(DurationPage), null, new DrillInNavigationTransitionInfo());
            }

            this.Next.IsEnabled = false;
        }
Ejemplo n.º 5
0
        private async void BtnChangeLaneSettings_Click(object sender, RoutedEventArgs e)
        {
            await SongPagesHelper.AddMidiAsync().ConfigureAwait(true);

            _ = this.Frame.Navigate(typeof(LaneSettingsPage), null, new DrillInNavigationTransitionInfo());
        }