private void btnNewLang_Click(object sender, EventArgs e) { FrmLanguageAdd f = new FrmLanguageAdd(LangList); if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.LangList.AddLanguage(f.SelectedLanguage); SettingsEditor.SetLanguages(LangList.ToString(), true); } LoadLangsToListBox(); }
private void btnEditLang_Click(object sender, EventArgs e) { if (!(lstbxLangs.SelectedIndex >= this.LangList.LanguageList.Count && lstbxLangs.SelectedIndex > -1)) { FrmLanguageAdd f = new FrmLanguageAdd(LangList.LanguageList[lstbxLangs.SelectedIndex]); if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } this.LangList.AddLanguage(f.SelectedLanguage); } LoadLangsToListBox(); }