コード例 #1
0
        internal void OnAddNextButtonCommand(object param)
        {
            if (SelectedPreparationItem != null)
            {
                if (!IsMixableRangeCheckboxChecked)
                {
                    IsMixableRangeCheckboxChecked = true;
                }

                TempoSliderValue = SelectedPreparationItem.RoundedTrailingTempo;
                SelectedHarmonicKeyComboBoxItem = HarmonicKeyComboBoxCollection[(HarmonicKeyComboBoxCollection.IndexOf(SelectedPreparationItem.TrailingHarmonicKey))];
                SearchTextBoxText = "";
                Filter();
                SelectRandomTrackCollectionItem();

                if (FilteredTrackCollection.Count() > 0)
                {
                    SelectedTabControlIndex = TrackCollectionTabControlIndex;
                }
            }
            else
            {
                MessageBox.Show("No track selected to find mixable tracks for.");
            }
        }
コード例 #2
0
        internal void Filter()
        {
            FilteredTrackCollection = _songListModel.GetFilteredTrackCollection();
            var filteredTrackCollectionCount = FilteredTrackCollection.Count();

            if (filteredTrackCollectionCount > 0)
            {
                SelectedTrackCollectionItem = FilteredTrackCollection[0];
            }

            UpdateStatusMessage();
            EnableControls();
        }
コード例 #3
0
 internal void SelectRandomTrackCollectionItem()
 {
     if (FilteredTrackCollection.Count() > 0)
     {
         var randomRowIndex = _songListModel.GetRandomRowIndex();
         SelectedTrackCollectionItem = FilteredTrackCollection[randomRowIndex];
         UpdateStatusMessage();
     }
     else if (SelectedPreparationItem != null)
     {
         var statusMessage = string.Concat("No tracks are mixable with ", SelectedPreparationItem.FullNameText);
         ProgressBarMessage = statusMessage;
         MessageBox.Show(string.Concat(statusMessage, "."));
     }
 }