protected override Color GetKnownColor(KnownTabColor knownColor) { switch (knownColor) { case KnownTabColor.TabActiveGradientBegin: case KnownTabColor.TabSelectedGradientBegin: case KnownTabColor.TabInactiveGradientBegin: return Color.White; case KnownTabColor.TabActiveGradientEnd: case KnownTabColor.TabSelectedGradientEnd: return Color.LightSteelBlue; case KnownTabColor.TabInactiveGradientEnd: return Color.Gainsboro; case KnownTabColor.TabActiveBorderOuter: return Color.Gray; case KnownTabColor.TabInactiveBorderOuter: return Color.Silver; case KnownTabColor.TabStripBottomBorder: return Color.Black; case KnownTabColor.TabActiveText: case KnownTabColor.TabInactiveText: return SystemColors.ControlText; } return Color.Empty; }
protected virtual Color GetKnownColor(KnownTabColor knownColor) { switch (knownColor) { case KnownTabColor.TabActiveGradientBegin: return this.ColorTable.ToolStripGradientBegin; case KnownTabColor.TabActiveGradientEnd: case KnownTabColor.TabStripBottomBorder: return this.ColorTable.ToolStripGradientEnd; case KnownTabColor.TabSelectedGradientBegin: return this.ColorTable.ButtonSelectedGradientBegin; case KnownTabColor.TabSelectedGradientEnd: return this.ColorTable.ButtonSelectedGradientEnd; case KnownTabColor.TabInactiveGradientBegin: case KnownTabColor.TabInactiveGradientEnd: return this.ColorTable.MenuStripGradientEnd; case KnownTabColor.TabActiveBorderOuter: case KnownTabColor.TabInactiveBorderOuter: return this.ColorTable.SeparatorDark; case KnownTabColor.TabBorderInner: return this.ColorTable.SeparatorLight; case KnownTabColor.TabActiveText: case KnownTabColor.TabInactiveText: case KnownTabColor.TabSelectedText: return SystemColors.ControlText; } return Color.Empty; }
public virtual Color FromKnownColor(KnownTabColor knownColor) { Color color = this.GetKnownColor(this.MapKnownColor(knownColor)); if (color.IsEmpty) { throw new InvalidEnumArgumentException(); } return color; }
public override Color FromKnownColor(KnownTabColor knownColor) { Color color; if ((this.FColorMap == null) || !this.FColorMap.TryGetValue(knownColor, out color)) { knownColor = this.MapKnownColor(knownColor); color = this.GetKnownColor(knownColor); if (!color.IsEmpty) { return color; } if ((this.FColorMap == null) || !this.FColorMap.TryGetValue(knownColor, out color)) { throw new InvalidEnumArgumentException(); } } return color; }
protected virtual KnownTabColor MapKnownColor(KnownTabColor knownColor) { return knownColor; }