//private MetroFramework.Components.MetroStyleManager Style; public Write(string MailAddress, string password, MetroFramework.MetroThemeStyle style) { InitializeComponent(); this.address = MailAddress; this.pw = password; this.StyleManager = Style; Style.Theme = style; }
public void ChgTheme(MetroFramework.MetroThemeStyle Theme, MetroFramework.MetroColorStyle Style) { metroStyleManager1.Style = Style; metroStyleManager1.Theme = Theme; tableLayoutPanel1.BackColor = Theme == MetroFramework.MetroThemeStyle.Light ? Color.FromArgb(0, 174, 220) : Color.FromArgb(23, 23, 23); tableLayoutPanel3.BackColor = Theme == MetroFramework.MetroThemeStyle.Light ? Color.FromArgb(0, 174, 220) : Color.FromArgb(32, 32, 32); this.StyleManager = metroStyleManager1; }
private void changeTheme(MetroFramework.MetroThemeStyle theme) { check_openDirectory.Theme = theme; check_duplicates.Theme = theme; manager.Theme = theme; }
public contextcolors(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style) { _theme = Theme; _style = Style; }
public MetroCTXRenderer(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style) : base(new contextcolors(Theme, Style)) { }
/// <summary> /// ClearControls /// </summary> /// <param name="Xcontrol"></param> public static void ClearControls(System.Windows.Forms.Control Xcontrol, bool clear, bool inverteTheme) { if (Xcontrol == null) { return; } MetroFramework.MetroThemeStyle uTheme = uninfeDummy.mainForm.metroStyleManager1.Theme;//.uTheme; /* */ //if (inverteTheme) //{ //uTheme = MetroFramework.MetroThemeStyle.Light; //} //return; if (Xcontrol.GetType().IsSubclassOf(typeof(MetroFramework.Controls.MetroUserControl)) || Xcontrol.GetType().IsSubclassOf(typeof(MetroFramework.Controls.MetroTabPage)) || Xcontrol.GetType().IsSubclassOf(typeof(MetroFramework.Controls.MetroTabControl)) || Xcontrol.GetType().IsSubclassOf(typeof(MetroFramework.Forms.MetroForm))) { if (Xcontrol.GetType().IsSubclassOf(typeof(MetroFramework.Forms.MetroForm))) { ((MetroFramework.Interfaces.IMetroForm)Xcontrol).Theme = uTheme; ((MetroFramework.Interfaces.IMetroForm)Xcontrol).Style = uninfeDummy.mainForm.metroStyleManager1.Style;//.uStyle; //((MetroFramework.Interfaces.IMetroForm)Xcontrol).StyleManager = uninfeDummy.mainForm.StyleManager; } else { ((MetroFramework.Interfaces.IMetroControl)Xcontrol).Theme = uTheme; ((MetroFramework.Interfaces.IMetroControl)Xcontrol).Style = uninfeDummy.mainForm.metroStyleManager1.Style;//.uStyle; //((MetroFramework.Interfaces.IMetroControl)Xcontrol).StyleManager = uninfeDummy.mainForm.StyleManager; } } /* */ foreach (Control control in Xcontrol.Controls) { if (control.Controls.Count > 0) { ClearControls(control, clear, inverteTheme); } if (clear) { if (control.GetType().IsAssignableFrom(typeof(TextBox))) { NFe.Components.Functions.SetProperty(control, "Text", ""); } if (control.GetType().IsAssignableFrom(typeof(MetroFramework.Controls.MetroTextBox))) { NFe.Components.Functions.SetProperty(control, "Text", ""); } NFe.Components.Functions.SetProperty(control, "PromptText", ""); } NFe.Components.Functions.SetProperty(control, "UseStyleColors", false); if (control is MetroFramework.Interfaces.IMetroControl) { try { ((MetroFramework.Interfaces.IMetroControl)control).Theme = mainForm.metroStyleManager1.Theme; ((MetroFramework.Interfaces.IMetroControl)control).Style = mainForm.metroStyleManager1.Style; //((MetroFramework.Interfaces.IMetroControl)control).StyleManager = mainForm.metroStyleManager1; } catch { } } } }
public void CreateNotification(System.Drawing.Color ColorTxt, double Opacity, MetroFramework.MetroThemeStyle Theme, MetroFramework.MetroColorStyle style) { // //Form frm.Size = new System.Drawing.Size(375, 120); frm.ShowInTaskbar = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Theme = Theme; frm.Style = style; frm.Resizable = false; frm.MaximizeBox = false; frm.MinimizeBox = false; frm.TopMost = false; frm.Name = "frm"; frm.Opacity = Opacity; frm.ShowInTaskbar = false; // // // //Label //lbl.Location = new System.Drawing.Point(10, 40);//113 40 //lbl.Font = new System.Drawing.Font("Tahoma", 100, System.Drawing.FontStyle.Bold); //lbl.AutoSize = true; //lbl.MaximumSize = new System.Drawing.Size(0, 0); //lbl.BackColor = frm.BackColor; //lbl.ForeColor = ColorTxt; // // //TextBox txtMessage.Location = new System.Drawing.Point(113, 40); txtMessage.Size = new System.Drawing.Size(260, 90); txtMessage.BackColor = frm.BackColor; txtMessage.Font = new System.Drawing.Font("Tahoma", 10); txtMessage.BorderStyle = BorderStyle.None; txtMessage.ReadOnly = true; txtMessage.ForeColor = ColorTxt; txtMessage.TabStop = false; txtMessage.Multiline = true; //txtMessage.Enabled = true; // //PictureBox PictureBox pic = new PictureBox(); pic.BackColor = frm.BackColor; pic.SizeMode = PictureBoxSizeMode.StretchImage; pic.Location = new System.Drawing.Point(17, 22); pic.Size = new System.Drawing.Size(80, 80); Image img = new Bitmap(AppDomain.CurrentDomain.BaseDirectory + "Images\\IcoInfo64x64.ico"); pic.Image = img; //Добавляем элементы на форму frm.Controls.Add(txtMessage); frm.Controls.Add(pic); }
public MetroCTXRenderer(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style) : base(new MetroCTXColorTable(Theme, Style)) { theme = Theme; style = Style; }
public MenuColorPallet(MetroFramework.MetroThemeStyle Theme, MetroFramework.MetroColorStyle Style) { this.Theme = Theme; this.Style = Style; }
private void ThemeChanged(object sender, EventArgs e) { bool lightmode = (Settings_Theme_Selection.SelectedIndex == 1); Config.Theme = (lightmode ? 1 : 0); MetroFramework.MetroThemeStyle themeStyle = (lightmode ? MetroFramework.MetroThemeStyle.Light : MetroFramework.MetroThemeStyle.Dark); StyleManager.Style = (lightmode ? MetroFramework.MetroColorStyle.Green : MetroFramework.MetroColorStyle.Red); StyleManager.Theme = themeStyle; Theme = themeStyle; Style = (lightmode ? MetroFramework.MetroColorStyle.Red : MetroFramework.MetroColorStyle.Green); Link_Discord.BackColor = (lightmode ? Color.White : Color.FromArgb(17, 17, 17)); Link_Twitter.BackColor = Link_Discord.BackColor; Link_Wiki.BackColor = Link_Discord.BackColor; Link_GitHub.BackColor = Link_Discord.BackColor; Link_GitHub.Image = (lightmode ? Properties.Resources.GitHub_Light : Properties.Resources.GitHub_Dark); ML_Logo.BackColor = Link_Discord.BackColor; ML_Text.BackColor = Link_Discord.BackColor; InstallerVersion.Theme = themeStyle; PageManager.Style = StyleManager.Style; PageManager.Theme = themeStyle; Tab_Automated.Theme = themeStyle; Tab_ManualZip.Theme = themeStyle; Tab_Settings.Theme = themeStyle; Settings_Theme_Text.Theme = themeStyle; Settings_Theme_Selection.Style = Style; Settings_Theme_Selection.Theme = MetroFramework.MetroThemeStyle.Light; Settings_AutoUpdateInstaller.Style = Style; Settings_AutoUpdateInstaller.Theme = themeStyle; Settings_AutoUpdateInstaller.ForeColor = (lightmode ? Color.FromKnownColor(KnownColor.ControlText) : Color.FromKnownColor(KnownColor.ControlDark)); Settings_AutoUpdateInstaller.CustomForeColor = true; Settings_CloseAfterCompletion.Style = Style; Settings_CloseAfterCompletion.Theme = themeStyle; Settings_CloseAfterCompletion.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Settings_CloseAfterCompletion.CustomForeColor = true; Settings_ShowAlphaPreReleases.Style = Style; Settings_ShowAlphaPreReleases.Theme = themeStyle; Settings_ShowAlphaPreReleases.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Settings_ShowAlphaPreReleases.CustomForeColor = true; Settings_RememberLastSelectedGame.Style = Style; Settings_RememberLastSelectedGame.Theme = themeStyle; Settings_RememberLastSelectedGame.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Settings_RememberLastSelectedGame.CustomForeColor = true; Settings_HighlightLogFileLocation.Style = Style; Settings_HighlightLogFileLocation.Theme = themeStyle; Settings_HighlightLogFileLocation.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Settings_HighlightLogFileLocation.CustomForeColor = true; Automated_UnityGame_Text.Theme = themeStyle; Automated_UnityGame_Select.Theme = themeStyle; Automated_UnityGame_Display.BackColor = (lightmode ? Color.White : Color.FromArgb(34, 34, 34)); Automated_UnityGame_Display.ForeColor = (lightmode ? Color.Black : Color.FromArgb(204, 204, 204)); Automated_Version_Text.Theme = themeStyle; Automated_Version_Selection.Style = Style; Automated_Version_Selection.Theme = themeStyle; Automated_Version_Latest.Style = Style; Automated_Version_Latest.Theme = themeStyle; Automated_Version_Latest.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Automated_Version_Latest.CustomForeColor = true; Automated_Arch_Text.Theme = themeStyle; Automated_Arch_Selection.Theme = themeStyle; Automated_Arch_AutoDetect.Style = Style; Automated_Arch_AutoDetect.Theme = themeStyle; Automated_Arch_AutoDetect.ForeColor = Settings_AutoUpdateInstaller.ForeColor; Automated_Arch_AutoDetect.CustomForeColor = true; Automated_Divider.Theme = themeStyle; ManualZip_Divider.Theme = themeStyle; Automated_Install.Theme = themeStyle; Automated_Uninstall.Theme = themeStyle; Tab_Output.Theme = themeStyle; ManualZip_Install.Theme = themeStyle; ManualZip_Uninstall.Theme = themeStyle; ManualZip_UnityGame_Text.Theme = themeStyle; ManualZip_UnityGame_Select.Theme = themeStyle; ManualZip_UnityGame_Display.BackColor = Automated_UnityGame_Display.BackColor; ManualZip_UnityGame_Display.ForeColor = Automated_UnityGame_Display.ForeColor; ManualZip_ZipArchive_Text.Theme = themeStyle; ManualZip_ZipArchive_Select.Theme = themeStyle; ManualZip_ZipArchive_Display.BackColor = Automated_UnityGame_Display.BackColor; ManualZip_ZipArchive_Display.ForeColor = Automated_UnityGame_Display.ForeColor; InstallerUpdateNotice.Theme = themeStyle; InstallerUpdateNotice.ForeColor = (lightmode ? Color.Red : Color.Green); Output_Divider.Theme = themeStyle; Output_Current_Text.Theme = themeStyle; Output_Current_Operation.Theme = themeStyle; Output_Current_Progress_Display.Theme = themeStyle; Output_Current_Progress_Text.Theme = themeStyle; Output_Current_Progress_Text_Label.Theme = themeStyle; Output_Total_Text.Theme = themeStyle; Output_Total_Progress_Display.Theme = themeStyle; Output_Total_Progress_Text.Theme = themeStyle; Output_Total_Progress_Text_Label.Theme = themeStyle; PleaseWait_PleaseWait.Theme = themeStyle; PleaseWait_Text.Theme = themeStyle; Automated_x64Only.Theme = themeStyle; }
private void ToggleDarkMode(bool dark = false) { MetroFramework.MetroThemeStyle mode = dark ? MetroFramework.MetroThemeStyle.Dark : MetroFramework.MetroThemeStyle.Default; mtcSettings.UseStyleColors = dark; mtcSettings.Theme = mode; mtpProduction.Theme = mode; mtpMisc.Theme = mode; mtpData.Theme = mode; mtpManually.Theme = mode; mtpPremium.Theme = mode; mtpBots.Theme = mode; mpProdCycle.Theme = mode; mpGoodCycle.Theme = mode; mtbSave.UseVisualStyleBackColor = !dark; mtbSave.Theme = mode; mtbCustomUserAgent.Theme = mode; mtbCustomUserAgent.UseStyleColors = dark; mtbSerialKey.Theme = mode; mtbSerialKey.UseStyleColors = dark; mbCheckSerial.UseVisualStyleBackColor = !dark; mbCheckSerial.Theme = mode; mbSaveReload.UseVisualStyleBackColor = !dark; mbSaveReload.Theme = mode; mbDeleteData.UseVisualStyleBackColor = !dark; mbDeleteData.Theme = mode; mcbLanguage.Theme = mode; mcbCitySelection.Theme = mode; metroLabel5.UseStyleColors = dark; metroLabel5.Theme = mode; metroLabel3.UseStyleColors = dark; metroLabel3.Theme = mode; metroLabel2.UseStyleColors = dark; metroLabel2.Theme = mode; metroLabel1.UseStyleColors = dark; metroLabel1.Theme = mode; metroLabel12.UseStyleColors = dark; metroLabel12.Theme = mode; lblAutoLogin.UseStyleColors = dark; lblAutoLogin.Theme = mode; lblRestartNeeded.UseStyleColors = dark; lblRestartNeeded.Theme = mode; lblRestartNeeded.UseStyleColors = dark; lblRestartNeeded.Theme = mode; lblCustomUserAgent.UseStyleColors = dark; lblCustomUserAgent.Theme = mode; lblLanguage.UseStyleColors = dark; lblLanguage.Theme = mode; metroLabel10.UseStyleColors = dark; metroLabel10.Theme = mode; metroLabel9.UseStyleColors = dark; metroLabel9.Theme = mode; metroLabel8.UseStyleColors = dark; metroLabel8.Theme = mode; metroLabel7.UseStyleColors = dark; metroLabel7.Theme = mode; metroLabel6.UseStyleColors = dark; metroLabel6.Theme = mode; metroLabel4.UseStyleColors = dark; metroLabel4.Theme = mode; lblSerialKey.UseStyleColors = dark; lblSerialKey.Theme = mode; metroLabel11.UseStyleColors = dark; metroLabel11.Theme = mode; lblChooseWorld.UseStyleColors = dark; lblChooseWorld.Theme = mode; lblDeleteData.UseStyleColors = dark; lblDeleteData.Theme = mode; mrbG1d.Theme = mode; mrbG1d.UseVisualStyleBackColor = !dark; mrbG1d.UseStyleColors = dark; mrbG2d.Theme = mode; mrbG2d.UseVisualStyleBackColor = !dark; mrbG2d.UseStyleColors = dark; mrbG4h.Theme = mode; mrbG4h.UseVisualStyleBackColor = !dark; mrbG4h.UseStyleColors = dark; mrbG8h.Theme = mode; mrbG8h.UseVisualStyleBackColor = !dark; mrbG8h.UseStyleColors = dark; mrb5.Theme = mode; mrb5.UseVisualStyleBackColor = !dark; mrb5.UseStyleColors = dark; mrb15.Theme = mode; mrb15.UseVisualStyleBackColor = !dark; mrb15.UseStyleColors = dark; mrb1.Theme = mode; mrb1.UseVisualStyleBackColor = !dark; mrb1.UseStyleColors = dark; mrb4.Theme = mode; mrb4.UseVisualStyleBackColor = !dark; mrb4.UseStyleColors = dark; mrb8.Theme = mode; mrb8.UseVisualStyleBackColor = !dark; mrb8.UseStyleColors = dark; mrb1d.Theme = mode; mrb1d.UseVisualStyleBackColor = !dark; mrb1d.UseStyleColors = dark; mtView.Theme = mode; mtView.UseVisualStyleBackColor = !dark; mtView.UseStyleColors = dark; mtDarkMode.Theme = mode; mtDarkMode.UseVisualStyleBackColor = !dark; mtDarkMode.UseStyleColors = dark; mtAutoLogin.Theme = mode; mtAutoLogin.UseVisualStyleBackColor = !dark; mtAutoLogin.UseStyleColors = dark; mtRQBot.Theme = mode; mtRQBot.UseVisualStyleBackColor = !dark; mtRQBot.UseStyleColors = dark; mtIncident.Theme = mode; mtIncident.UseVisualStyleBackColor = !dark; mtIncident.UseStyleColors = dark; mtMoppel.Theme = mode; mtMoppel.UseVisualStyleBackColor = !dark; mtMoppel.UseStyleColors = dark; mtTavern.Theme = mode; mtTavern.UseVisualStyleBackColor = !dark; mtTavern.UseStyleColors = dark; mtBigRoads.Theme = mode; mtBigRoads.UseVisualStyleBackColor = !dark; mtBigRoads.UseStyleColors = dark; Refresh(); }
public MetroCTXColorTable(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style) { _theme = Theme; _style = Style; }