private void btnAdd_Click(object sender, EventArgs e)
{
using (var dlg = new LexImportWizardLanguage(m_cache, m_uiLangs, m_helpTopicProvider, m_app, m_stylesheet))
{
if (dlg.ShowDialog(this) == DialogResult.OK)
{
string langDesc, ws, ec, wsId;
// retrieve the new WS information from the dlg
dlg.GetCurrentLangInfo(out langDesc, out ws, out ec, out wsId);
// now put the lang info into the language list view
if (LexImportWizard.Wizard().AddLanguage(langDesc, ws, ec, wsId))
{
// this was added to the list of languages, so add it to the dlg and select it
var langInfo = new Sfm2Xml.LanguageInfoUI(langDesc, ws, ec, wsId);
if (cbLangDesc.FindStringExact(langInfo.ToString()) < 0)
{
cbLangDesc.Items.Add(langInfo);
}
cbLangDesc.SelectedItem = langInfo;
}
}
}
}