コード例 #1
0
        /// <summary>
        /// Creates a new instance of the theme states object.
        /// </summary>
        public ThemeStates(Colors themeColors = null)
        {
            themeColors = themeColors ?? Library.Default.Colors;

            RefreshTheme(themeColors);
        }
コード例 #2
0
ファイル: TextBoxTheme.cs プロジェクト: snjatdw/SadConsole
        /// <inheritdoc />
        public override void RefreshTheme(Colors themeColors)
        {
            base.RefreshTheme(themeColors);

            Normal = new SadConsole.Cell(themeColors.Text, themeColors.GrayDark);
        }
コード例 #3
0
        /// <summary>
        /// Called when the theme is attached to a control.
        /// </summary>
        /// <param name="control">The control that will use this theme instance.</param>
        public virtual void Attached(ControlBase control)
        {
            Colors colors = Colors ?? control.Parent?.Theme.Colors ?? Library.Default.Colors;

            RefreshTheme(colors);
        }