예제 #1
0
파일: FrmMain.cs 프로젝트: xxq860725/scada
        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);
                }
            }
        }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
 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);
     }
 }