public override void DrawHourLabel(System.Drawing.Graphics g, System.Drawing.Rectangle rect, int hour, bool ampm)
{
if (g == null)
throw new ArgumentNullException("g");
using (SolidBrush brush = new SolidBrush(this.TextColor))
{
string ampmtime;
if (ampm)
{
if (hour < 12)
ampmtime = "AM";
else
ampmtime = "PM";
if (hour != 12)
hour = hour % 12;
}
else
ampmtime = "00";
g.DrawString(hour.ToString("##00", System.Globalization.CultureInfo.InvariantCulture), HourFont, brush, rect);
rect.X += 27;
g.DrawString(ampmtime, MinuteFont, brush, rect);
}
}