public override void Draw(Graphics Graphics, StatusElementResources Resources) { Color TextColor = SystemColors.HotTrack; if (bMouseDown) { TextColor = Color.FromArgb(TextColor.B / 2, TextColor.G / 2, TextColor.R); } else if (bMouseOver) { TextColor = Color.FromArgb(TextColor.B, TextColor.G, TextColor.R); } TextRenderer.DrawText(Graphics, Text, Resources.FindOrAddFont(Style), Bounds.Location, TextColor, TextFormatFlags.NoPadding); }
public override Size Measure(Graphics Graphics, StatusElementResources Resources) { int Height = (int)(Resources.FindOrAddFont(FontStyle.Regular).Height * 0.9f); return(new Size(Height * 16, Height)); }
public override Size Measure(Graphics Graphics, StatusElementResources Resources) { return(TextRenderer.MeasureText(Graphics, Text, Resources.FindOrAddFont(Style), new Size(int.MaxValue, int.MaxValue), TextFormatFlags.NoPadding)); }
public override void Draw(Graphics Graphics, StatusElementResources Resources) { TextRenderer.DrawText(Graphics, Text, Resources.FindOrAddFont(Style), Bounds.Location, SystemColors.ControlText, TextFormatFlags.NoPadding); }