void ThemeMode() { using RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\SteamProfiles", true); switch (key.GetValue("Mode")?.ToString()) { case "Dark": Themes.ThemeChange(mode: true, this, Color.FromArgb(45, 45, 45), Color.FromArgb(45, 45, 45), Color.FromArgb(55, 55, 55)); BackColor = Color.FromArgb(45, 45, 45); Themes.ChangeForeColor(true, this, Color.White); break; case "Light": Themes.ThemeChange(mode: true, form: this, backcolor: Color.FromArgb(189, 204, 212), buttoncolor: Color.FromArgb(189, 204, 212), MouseDownBackColor: Color.FromArgb(55, 55, 55)); BackColor = Color.FromArgb(189, 204, 212); Themes.ChangeForeColor(true, this, Color.Black); break; case "OldSchool": Themes.ThemeChange(mode: true, this, Color.FromArgb(0, 0, 80), Color.FromArgb(0, 0, 80), Color.FromArgb(0, 0, 75)); BackColor = Color.FromArgb(0, 0, 80); Themes.ChangeForeColor(true, this, Color.White); break; default: key.SetValue("Mode", "Light"); break; } }
private void AddProfile_Load(object sender, EventArgs e) { res = new ResourceManager("SteamProfiles.Resource.Add.Res", typeof(Settings).Assembly); Switch_language(); using RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\SteamProfiles", true); if (key != null) { if (key?.GetValue("SteamPath") == null) { Close(); SteamPath(); } switch (key.GetValue("Mode")?.ToString()) { case "Dark": Themes.ThemeChange(mode: true, this, Color.FromArgb(45, 45, 45), Color.FromArgb(35, 35, 35), Color.FromArgb(55, 55, 55)); Themes.ChangeForeColor(true, this, Color.White); break; case "Light": Themes.ThemeChange(mode: true, form: this, backcolor: Color.FromArgb(189, 204, 212), buttoncolor: Color.FromArgb(166, 177, 183), MouseDownBackColor: Color.FromArgb(55, 55, 55)); Themes.ChangeForeColor(true, this, Color.Black); break; case "OldSchool": Themes.ThemeChange(mode: true, this, Color.FromArgb(0, 0, 80), Color.FromArgb(0, 0, 50), Color.FromArgb(0, 0, 75)); Themes.ChangeForeColor(true, this, Color.White); break; } } }
private void About_Load(object sender, EventArgs e) { SelectLanguage.Lang(); Assembly assembly = Assembly.GetExecutingAssembly(); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); string version = fvi.ProductVersion; label3.Text += " " + version; res = new ResourceManager("SteamProfiles.Resource.About.Res", typeof(Settings).Assembly); wallet = res.GetString("Wallet"); using RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\SteamProfiles", true); if (key != null) { switch (key.GetValue("Mode")?.ToString()) { case "Dark": Themes.ThemeChange(mode: true, this, Color.FromArgb(45, 45, 45), Color.FromArgb(28, 28, 28), Color.FromArgb(55, 55, 55)); Themes.ChangeForeColor(true, this, Color.White); linkLabel1.LinkColor = Color.White; linkLabel2.LinkColor = Color.White; linkLabel3.LinkColor = Color.White; linkLabel4.LinkColor = Color.White; break; case "Light": Themes.ThemeChange(mode: true, form: this, backcolor: Color.FromArgb(189, 204, 212), buttoncolor: Color.FromArgb(166, 177, 183), MouseDownBackColor: Color.FromArgb(55, 55, 55)); Themes.ChangeForeColor(true, this, Color.Black); break; case "OldSchool": Themes.ThemeChange(mode: true, this, Color.FromArgb(0, 0, 80), Color.FromArgb(0, 0, 50), Color.FromArgb(0, 0, 75)); Themes.ChangeForeColor(true, this, Color.White); linkLabel1.LinkColor = Color.White; linkLabel2.LinkColor = Color.White; linkLabel3.LinkColor = Color.White; linkLabel4.LinkColor = Color.White; break; } } }