private void LexImportWizardLanguage_Load(object sender, EventArgs e) { // (Bev) modify a few labels if (m_LinguaLinksImport) { Text = LexTextControls.ksSpecifyFwWs; lblComment.Text = LexTextControls.ksSpecifyFwWsDescription; lblLangDesc.Text = LexTextControls.ksLanguageDefinition; } else { if (m_AddUsage) { Text = LexTextControls.ksAddLangMapping; } else { Text = LexTextControls.ksModifyLangMapping; } } tbLangDesc.Text = m_LangDesc; // initialize the 'ws' combo box and the AddWs button with the data from the DB ReloadWsCombo(); btnAddWS.Initialize(m_cache, m_helpTopicProvider, m_app, m_cache.ServiceLocator.WritingSystemManager.WritingSystems); // select the proper index if there is a valid writing system int index = 0; if (!string.IsNullOrEmpty(m_wsName)) { index = cbWS.FindStringExact(m_wsName); if (index < 0) { index = 0; } } cbWS.SelectedIndex = index; LoadEncodingConverters(); index = 0; if (!string.IsNullOrEmpty(m_encConverter)) { index = cbEC.FindStringExact(m_encConverter); if (index < 0) { index = 0; } } cbEC.SelectedIndex = index; }
private void LexImportWizardLanguage_Load(object sender, EventArgs e) { // (Bev) modify a few labels if (m_LinguaLinksImport) { Text = LexTextControls.ksSpecifyFwWs; lblComment.Text = LexTextControls.ksSpecifyFwWsDescription; lblLangDesc.Text = LexTextControls.ksLanguageDefinition; } else { if (m_AddUsage) { Text = LexTextControls.ksAddLangMapping; } else { Text = LexTextControls.ksModifyLangMapping; } } tbLangDesc.Text = m_LangDesc; // initialize the 'ws' combo box and the AddWs button with the data from the DB foreach (IWritingSystem ws in m_cache.ServiceLocator.WritingSystemManager.LocalWritingSystems) { var wsi = new WsInfo(ws.DisplayLabel, ws.Id, ws.LegacyMapping); m_wsInfo.Add(wsi.KEY, wsi); cbWS.Items.Add(wsi); } cbWS.Sorted = false; var wsiIgnore = new WsInfo(); cbWS.Items.Add(wsiIgnore); btnAddWS.Initialize(m_cache, m_helpTopicProvider, m_app, m_stylesheet, m_cache.ServiceLocator.WritingSystemManager.LocalWritingSystems); // select the proper index if there is a valid writing system int index = 0; if (!string.IsNullOrEmpty(m_wsName)) { index = cbWS.FindStringExact(m_wsName); if (index < 0) { index = 0; } } cbWS.SelectedIndex = index; LoadEncodingConverters(); index = 0; if (!string.IsNullOrEmpty(m_encConverter)) { index = cbEC.FindStringExact(m_encConverter); if (index < 0) { index = 0; } } cbEC.SelectedIndex = index; }