public static void RefreshColorSceme() { var materialSkinManager = MaterialSkinManager.Instance; if (Other.IsDarkMode()) {//Dark Mode materialSkinManager.ColorScheme = new ColorScheme(Primary.Grey900, Primary.Grey700, Primary.Grey700, Accent.Pink100, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; } else { materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink100, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; } if (env.mainForm == null || env.mainForm.materialLabel2 == null) { return; } env.mainForm.materialLabel2.BackColor = GetBackGroundColor(); }
public MainForm() { InitializeComponent(); var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); if (Other.IsDarkMode()) {//Dark Mode materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey500, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; } else { materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo500, Primary.Indigo500, Accent.LightBlue200, TextShade.WHITE); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; } RefreshUserData(); Settings.ReadSettings(); materialSingleLineTextField2.Text = Settings.maxMission.ToString(); materialLabel2.BackColor = Other.GetBackGroundColor(); }