private void MainForm_Load(object sender, EventArgs e) { #region Set Subpages Extract(resourcesPath, "Resources", "About.png"); setSubPages(true); #endregion #region Settings Preparation stsObj = new SettingsObject(settingsPath); // Create SettingsObject and load settings to form if (!File.Exists(stsObj.iniPath)) { stsObj.writeToIni(); } else { try { stsObj.loadFromIni(); } catch { MessageBoxEx.Show(this, LANG.getString("event_setting_load_error")); stsObj = null; stsObj = new SettingsObject(settingsPath); stsObj.writeToIni(); } } stsObj.language = LANG.Lang; stsObj.writeToSettings(sts); if (sts.pg4.settings4_4_chkupd.Value) updater.DoUpdate(true); #endregion // Set UI Font according to language LANG.setFont(this.Controls); CaptionFont = new Font(LANG.getFont(), CaptionFont.Size, CaptionFont.Style); Font = new Font(LANG.getFont(), Font.Size, Font.Style); }