private void DrawText(IGraphics g, bool onScreen, Style style)
{
Rectangle textBounds = GetTextRectangle();
if (string.IsNullOrEmpty(Text) && onScreen)
{
textBrush.Color = Color.FromArgb(128, style.CommentTextColor);
g.DrawString(Strings.DoubleClickToEdit,
style.CommentFont, textBrush, textBounds, format);
}
else
{
textBrush.Color = style.CommentTextColor;
g.DrawString(Text, style.CommentFont, textBrush, textBounds, format);
}
}