public About() { InitializeComponent(); ClientSize = new Size(400, 440); if (ExtraFunctions.ShouldDrawLight(SystemColors.Window)) { pictureBox1.Image = Properties.Resources.sct_banner_light_400x73; } else { pictureBox1.Image = Properties.Resources.sct_banner_dark_400x73; } }
private void MainForm_Load(object sender, EventArgs e) { SystemMenu menu = new SystemMenu(); SystemMenu.CopyToolStripToMenu(menuStrip1, menu); Controls.Remove(menuStrip1); SystemMenu = menu; panel1.ClientSize = new Size(panel1.ClientSize.Width, label2.Location.Y + 27); ClientSize = new Size(panel1.Width, panel1.Height + menu.Height); panel1.Location = new Point(0, 0); ExtraFunctions.UpdateStartupExecutable(false); File.WriteAllText($"{Configuration.InstallPath}addSchemes.bat", Properties.Resources.reg_classicschemes_add); Process.Start(new ProcessStartInfo() { FileName = $"{Configuration.InstallPath}addSchemes.bat", Verb = "runas", UseShellExecute = false, CreateNoWindow = true }); Version sctVersion = Assembly.GetExecutingAssembly().GetName().Version; label2.Text = label2.Text.Replace("%v", sctVersion.ToString(3)).Replace("%r", sctVersion.Revision.ToString()); CheckDependenciesAndSetControls(); if (ExtraFunctions.ShouldDrawLight(SystemColors.Control)) { pictureBox1.Image = Properties.Resources.sct_light_164; } else { pictureBox1.Image = Properties.Resources.sct_dark_164; } if (DateTime.Now.Year == 2022 && DateTime.Now.Day == 1 && DateTime.Now.Month == 1) { //linkLabel1.Hide(); //label2.Text = "Happy New Year!"; } }