private void miSettingsLanguage_Click(object sender, EventArgs e) { // создание и отображение формы выбора языка string prevCultureName = FrmLanguage.CultureName; FrmLanguage frmLanguage = new FrmLanguage(); if (frmLanguage.ShowDialog() == DialogResult.OK && prevCultureName != FrmLanguage.CultureName) { // запись культуры для выбранного языка в реестр string errMsg; if (Localization.WriteCulture(FrmLanguage.CultureName, out errMsg)) { ScadaUiUtils.ShowInfo(AppPhrases.LanguageChanged); } else { AppUtils.ProcError(errMsg); } } }
private void miSettingsLanguage_Click(object sender, EventArgs e) { // creating and displaying a language selection form string prevCultureName = FrmLanguage.CultureName; var frmLanguage = new FrmLanguage(); if (frmLanguage.ShowDialog() == DialogResult.OK && prevCultureName != FrmLanguage.CultureName) { // recording culture for the selected language in the registry string errMsg; if (Localization.WriteCulture(FrmLanguage.CultureName, out errMsg)) { ScadaUiUtils.ShowInfo(AppPhrases.LanguageChanged); } else { AppUtils.ProcError(errMsg); } } }
private void miSettingsLanguage_Click(object sender, EventArgs e) { // создание и отображение формы выбора языка string prevCultureName = FrmLanguage.CultureName; FrmLanguage frmLanguage = new FrmLanguage(); if (frmLanguage.ShowDialog() == DialogResult.OK && prevCultureName != FrmLanguage.CultureName) { // запись культуры для выбранного языка в реестр string errMsg; if (Localization.WriteCulture(FrmLanguage.CultureName, out errMsg)) ScadaUtils.ShowInfo(AppPhrases.LanguageChanged); else AppUtils.ProcError(errMsg); } }