private void FillTuningCombo(ArrangementType arrangementType, GameVersion gameVersion) { tuningComboBox.Items.Clear(); var tuningDefinitions = TuningDefinitionRepository.LoadTuningDefinitions(gameVersion); // LINQ method produces unexpected results on subsequent calls // foreach (var tuning in TuningDefinitionRepository.Instance().Select(gameVersion)) foreach (var tuning in tuningDefinitions) { // need to populate for Vocals too even though not used //if (arrangementType != ArrangementType.Bass) tuningComboBox.Items.Add(tuning); //if (arrangementType == ArrangementType.Bass) // tuningComboBox.Items.Add(TuningDefinition.Convert2Bass(tuning)); } tuningComboBox.SelectedIndex = 0; tuningComboBox.Refresh(); }
private void FillTuningCombo(ArrangementType arrangementType, GameVersion gameVersion) { tuningComboBox.Items.Clear(); var tuningDefinitions = TuningDefinitionRepository.LoadTuningDefinitions(gameVersion); // LINQ method produces unexpected results on subsequent calls // foreach (var tuning in TuningDefinitionRepository.Instance().Select(gameVersion)) foreach (var tuning in tuningDefinitions) { if (arrangementType == ArrangementType.Guitar) { tuningComboBox.Items.Add(tuning); } if (arrangementType == ArrangementType.Bass) { tuningComboBox.Items.Add(TuningDefinition.Convert2Bass(tuning)); } } tuningComboBox.SelectedIndex = 0; tuningComboBox.Refresh(); }