public void ChangeTheme(int idTheme) { ThemeColors.IdTheme = idTheme; ThemeColors.SelectTheme(); this.BackColor = ButtonClose.BackColor = ThemeColors.BackGround; this.ForeColor = ButtonClose.ForeColor = ThemeColors.ForeGround; TextBoxOutput.BackColor = ThemeColors.Workspace; TextBoxOutput.ForeColor = ThemeColors.ForeGround; }
public void ChangeTheme(int idTheme) { ThemeColors.IdTheme = idTheme; ThemeColors.SelectTheme(); // Вікно this.BackColor = ButtonClose.BackColor = ThemeColors.BackGround; this.ForeColor = LabelApply.ForeColor = LabelCancel.ForeColor = ButtonClose.ForeColor = ThemeColors.ForeGround; PanelTools.BackColor = LabelVersionProgram.BackColor = ThemeColors.Workspace; PanelTools.ForeColor = ThemeColors.ForeGround; // toolTip ToolTip.OwnerDraw = true; ToolTip.BackColor = ThemeColors.BackGround; ToolTip.ForeColor = ThemeColors.ForeGround; }
public MainWindow() { _isClosing = true; Scripts.Engine.Engine.IsHotKeyAccess = true; Scripts.Language.SetLanguage(Properties.Settings.Default.Language); InitializeComponent(); LabelTitleProgram.Text = Application.ProductName; Scripts.Engine.Engine.SetPriorityClass(System.Diagnostics.Process.GetCurrentProcess().Handle, 0x00000100); Scripts.Engine.Engine.Hook(Handle); ThemeColors.ChangeThemeEvents += ChangeTheme; ThemeColors.ChangeTheme(Properties.Settings.Default.IdTheme); }
public void ChangeTheme(int idTheme) { ThemeColors.IdTheme = idTheme; ThemeColors.SelectTheme(); // Вікно this.BackColor = ButtonClose.BackColor = ThemeColors.BackGround; this.ForeColor = LabelSettings.ForeColor = LabelExit.ForeColor = ButtonClose.ForeColor = ThemeColors.ForeGround; PanelTools.BackColor = ThemeColors.Workspace; PanelTools.ForeColor = ThemeColors.ForeGround; // Транслітератор ButtonTranslit.BackColor = ButtonLanUa.BackColor = ButtonLanRu.BackColor = ThemeColors.Workspace; // Вибрана кнопка з Panel1 (транслітерація - мова) Panel1(Properties.Settings.Default.IdPanel1); // Зміна регістра ButtonCaseChanging.BackColor = ButtonToLower.BackColor = ButtonToUpper.BackColor = ButtonToTitleCase.BackColor = ThemeColors.Workspace; // Вибрана кнопка з Panel2 (зміна регістра - тип) Panel2(Properties.Settings.Default.IdPanel2); // Реверс текста ButtonReverser.BackColor = ThemeColors.Workspace; // Вибрана кнопка функцій ChangeColor(Properties.Settings.Default.ButtonSelected); // contextMenuStrip1 NotifyContextMenu.BackColor = ThemeColors.BackGround; NotifyContextMenu.ForeColor = ThemeColors.ForeGround; // toolTip ToolTip.OwnerDraw = true; ToolTip.BackColor = ThemeColors.BackGround; ToolTip.ForeColor = ThemeColors.ForeGround; Properties.Settings.Default.IdTheme = idTheme; Properties.Settings.Default.Save(); }
private void ButtonThemeDark_Click(object sender, EventArgs e) { ThemeColors.ChangeTheme(Theme: 2); }
private void ButtonThemeLight_Click(object sender, EventArgs e) { ThemeColors.ChangeTheme(Theme: 0); }