예제 #1
0
        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);
        }
예제 #2
0
        public override Size Measure(Graphics Graphics, StatusElementResources Resources)
        {
            int Height = (int)(Resources.FindOrAddFont(FontStyle.Regular).Height * 0.9f);

            return(new Size(Height * 16, Height));
        }
예제 #3
0
 public override Size Measure(Graphics Graphics, StatusElementResources Resources)
 {
     return(TextRenderer.MeasureText(Graphics, Text, Resources.FindOrAddFont(Style), new Size(int.MaxValue, int.MaxValue), TextFormatFlags.NoPadding));
 }
예제 #4
0
 public override void Draw(Graphics Graphics, StatusElementResources Resources)
 {
     TextRenderer.DrawText(Graphics, Text, Resources.FindOrAddFont(Style), Bounds.Location, SystemColors.ControlText, TextFormatFlags.NoPadding);
 }