Changeset 3 for Common/Theme.cs


Ignore:
Timestamp:
Feb 21, 2019, 2:13:01 PM (6 years ago)
Author:
chronos
Message:
  • Added: Extended ComboBox with text history support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Theme.cs

    r1 r3  
    1212    public class Theme
    1313    {
     14        public delegate void ApplyThemeHandler(Component component);
     15        static public event ApplyThemeHandler OnApplyTheme = null;
    1416        static public Color ColorWindow;
    1517        static public Color ColorWindowText;
     
    9597                (component as LinkLabel).VisitedLinkColor = ColorControlText;
    9698            } else
    97             if (component is TabControl) 
     99            if (component is TabControl)
    98100            {
    99101                foreach (TabPage tabPage in (component as TabControl).TabPages)
     
    132134                (component as DataGridView).ColumnHeadersDefaultCellStyle.BackColor = ColorWindow;
    133135                (component as DataGridView).ColumnHeadersDefaultCellStyle.ForeColor = ColorWindowText;
    134             }
     136            } else
     137            if (component is RichTextBox)
     138            {
     139                (component as RichTextBox).SelectAll();
     140                (component as RichTextBox).SelectionColor = ColorWindowText;
     141                (component as RichTextBox).SelectionLength = 0;
     142            } else
     143           
     144            OnApplyTheme(component);
    135145        }
    136146
Note: See TracChangeset for help on using the changeset viewer.