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."); } }
internal void Filter() { FilteredTrackCollection = _songListModel.GetFilteredTrackCollection(); var filteredTrackCollectionCount = FilteredTrackCollection.Count(); if (filteredTrackCollectionCount > 0) { SelectedTrackCollectionItem = FilteredTrackCollection[0]; } UpdateStatusMessage(); EnableControls(); }
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, ".")); } }