示例#1
0
文件: MainWindow.cs 项目: vego1mar/PI
 private void OnLoad(object sender, EventArgs e)
 {
     LanguageAssist.CurrentLanguage = Languages.English;
     LanguageAssist.TryLocalizeCulture(Languages.English);
     LocalizeWindow();
     UpdateUiBySettings();
     log.Info(MethodBase.GetCurrentMethod().Name + '(' + (sender as Form).Name + ')');
 }
示例#2
0
文件: MainWindow.cs 项目: vego1mar/PI
        private void OnMenuSelectLanguage(object sender, EventArgs e)
        {
            using (var dialog = new LanguageSelector()) {
                dialog.Height = Settings.Dimensions.LanguageSelector.Height;
                dialog.Width  = Settings.Dimensions.LanguageSelector.Width;
                UiControls.TryShowDialog(dialog, this);

                if (dialog.DialogResult == DialogResult.OK)
                {
                    LanguageAssist.CurrentLanguage = dialog.GetSelectedLanguage();
                    LanguageAssist.TryLocalizeCulture(dialog.GetSelectedLanguage());
                    LocalizeWindow();
                }
            }

            log.Info(MethodBase.GetCurrentMethod().Name + "()");
        }