private void MainWindow_Load(object sender, EventArgs e) { ColorScheme.SetColorScheme(this); //optionsTab.ItemSize = new Size((this.Width / 4) - 6, optionsTab.ItemSize.Height); System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly(); this.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico")); LogCenter.ti = new TrayIcon(); Program.uc = new UpdateChecker(); Program.uc.Updater(); PassThru.Tabs.DownloadCenter.Instance.Width = 800; PassThru.Tabs.DownloadCenter.Instance.Height = 600; PassThru.Tabs.DownloadCenter.Instance.Show(); PassThru.Tabs.DownloadCenter.Instance.Hide(); // call the log purger LogCenter.cleanLogs(); log = new Tabs.LogDisplay(); log.Dock = DockStyle.Fill; ColorScheme.SetColorScheme(log); LogCenter.PushLogEvent += new LogCenter.NewLogEvent(log.Instance_PushLogEvent); splitContainer1.Panel2.Controls.Add(log); // load up the adapter control handler ac = new AdapterControl(); ColorScheme.SetColorScheme(ac); ac.Dock = DockStyle.Fill; //tabPage3.Controls.Add(ac); // load up the options tab handler od = new OptionsDisplay(); ColorScheme.SetColorScheme(od); od.Dock = DockStyle.Fill; //tabPage2.Controls.Add(od); // load up the options tab handler help = new Help(); ColorScheme.SetColorScheme(help); help.Dock = DockStyle.Fill; //tabPage4.Controls.Add(help); ColorScheme.ThemeChanged += new System.Threading.ThreadStart(ColorScheme_ThemeChanged); switch (LanguageConfig.GetCurrentLanguage()) { case LanguageConfig.Language.NONE: case LanguageConfig.Language.ENGLISH: tabPage1.Text = "Log"; tabPage2.Text = "Options"; tabPage3.Text = "Adapters"; break; case LanguageConfig.Language.CHINESE: tabPage1.Text = "登录"; tabPage2.Text = "选项"; tabPage3.Text = "适配器"; break; case LanguageConfig.Language.GERMAN: tabPage1.Text = "Log"; tabPage2.Text = "Optionen"; tabPage3.Text = "Adapter"; break; case LanguageConfig.Language.RUSSIAN: tabPage1.Text = "журнал"; tabPage2.Text = "опции"; tabPage3.Text = "Адаптеры"; break; case LanguageConfig.Language.SPANISH: tabPage1.Text = "log"; tabPage2.Text = "opciones"; tabPage3.Text = "adaptadores"; break; case LanguageConfig.Language.PORTUGUESE: tabPage1.Text = "Entrar"; tabPage2.Text = "opções"; tabPage3.Text = "adaptadores"; break; } MainWindow_Resize(null, null); if (TrayIcon.StartMinimized) { this.WindowState = FormWindowState.Minimized; } ColorScheme_ThemeChanged(); }