private void btnTransToolSave_Click(object sender, EventArgs e) { if (mLanguageFileContent != null) { mLanguageFileContent.FileName = tbTransToolFileName.Text; mLanguageFileContent.Name = tbTransToolLanguageName.Text; mLanguageFileContent.ShortName = tbTransToolLanguageShortName.Text; mLanguageFileContent.Save(); mLastSelectedItemName = mLanguageFileContent.FileName; cbTransToolLanguages.Items.Clear(); cbTransToolLanguages.Items.AddRange(TranslationController.GetAvailableLanguages()); foreach (LanguageSelectInfo item in cbTransToolLanguages.Items) { if (item.Name == mLastSelectedItemName) { cbTransToolLanguages.SelectedItem = item; break; } } } }
private void ucTranslationView_Load(object sender, EventArgs e) { cbTransToolLanguages.Items.Clear(); cbTransToolLanguages.Items.AddRange(TranslationController.GetAvailableLanguages()); }