Exemplo n.º 1
0
        /// <summary>
        /// Edit a track in a live session
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void appBtnEditTrack_Click(object sender, RoutedEventArgs e)
        {
            // Open a Track content dialog
            cdNewTrack newTrackDialog = new cdNewTrack();
            await newTrackDialog.ShowAsync();

            // Refresh the listview
            track_list.ItemsSource = selSession.tracks.ToList();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add a new track to the current session
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void appBtnNewTrack_Click(object sender, RoutedEventArgs e)
        {
            // Open a Track content dialog
            cdNewTrack newTrackDialog = new cdNewTrack();
            int        maxIndx        = 0;

            await newTrackDialog.ShowAsync();

            if (newTrackDialog.usrClicked == cdClicked.Save)
            {
                newTrackDialog.newTrack.session = selSession;
                // Get max index
                maxIndx = selSession.getMaxTrackIndex();

                // set track index
                newTrackDialog.newTrack.index = maxIndx + 1;
                newTrackDialog.newTrack.DBSave();
            }

            // Refresh the listview
            track_list.ItemsSource = selSession.tracks.ToList();
        }