private void PopulateAppIdCombo(ComboBox combo, GameVersion gameVersion) { var appIdList = SongAppIdRepository.Instance().Select(gameVersion).ToArray(); combo.DataSource = appIdList; combo.DisplayMember = "DisplayName"; combo.ValueMember = "AppId"; }
private void PopulateAppIdCombo(GameVersion gameVersion) { cmbAppId.Items.Clear(); foreach (var song in SongAppIdRepository.Instance().Select(gameVersion)) cmbAppId.Items.Add(song); var songAppId = SongAppIdRepository.Instance().Select((gameVersion == GameVersion.RS2014) ? ConfigRepository.Instance()["general_defaultappid_RS2014"] : ConfigRepository.Instance()["general_defaultappid_RS2012"], gameVersion); cmbAppId.SelectedItem = songAppId; txtAppId.Text = songAppId.AppId; }
private void PopulateAppIdCombo() { var appIdList = SongAppIdRepository.Instance().Select(GameVersion.RS2014).ToArray(); appIdCombo.DataSource = appIdList; appIdCombo.DisplayMember = "DisplayName"; appIdCombo.ValueMember = "AppId"; var songAppId = SongAppIdRepository.Instance().Select(ConfigRepository.Instance()["general_defaultappid_RS2014"], GameVersion.RS2014); appIdCombo.SelectedValue = songAppId.AppId; }
private void PopulateAppIdCombo(GameVersion gameVersion) { appIdCombo.Items.Clear(); foreach (var song in SongAppIdRepository.Instance().Select(gameVersion)) { appIdCombo.Items.Add(song); } var songAppId = SongAppIdRepository.Instance().Select(ConfigRepository.Instance()["general_defaultappid_RS2014"], gameVersion); appIdCombo.SelectedItem = songAppId; AppId = songAppId.AppId; }
private void SelectComboAppId(string appId) { var songAppId = SongAppIdRepository.Instance().Select(appId, gameVersion); if (SongAppIdRepository.Instance().List.Any <SongAppId>(a => a.AppId == appId)) { cmbAppId.SelectedItem = songAppId; } else { if (!appId.IsAppIdSixDigits()) { MessageBox.Show("Please enter a valid six digit " + Environment.NewLine + "App ID before continuing.", MESSAGEBOX_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { MessageBox.Show("User entered an unknown AppID." + Environment.NewLine + Environment.NewLine + "Toolkit will use the AppID that " + Environment.NewLine + "was entered manually but it can " + Environment.NewLine + "not assess its validity.", MESSAGEBOX_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Information); } } }