Source/ElementStyleDisplay.cs
(开头部分) 53KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
#if AdvTree
namespace DevComponents.Tree
#elif DOTNETBAR
namespace DevComponents.DotNetBar
#endif
{
/// <summary>
/// Paints the ElementStyle
/// </summary>
public class ElementStyleDisplay
{
/// <summary>Creates new instance of the object.</summary>
public ElementStyleDisplay()
{
}
/// <summary>
/// Paints text for given style.
/// </summary>
/// <param name="e">Display information.</param>
/// <param name="text">Text to paint.</param>
/// <param name="defaultFont">Default font if no font by style is specified.</param>
public static void PaintText(ElementStyleDisplayInfo e, string text, Font defaultFont)
{
PaintText(e, text, defaultFont, false);
}
/// <summary>
/// Paints text for given style.
/// </summary>
/// <param name="e">Display information.</param>
/// <param name="text"><Text to paint./param>
/// <param name="defaultFont">Default font if no font by style is specified.</param>
/// <param name="useDefaultFont">Specifies whether to use default font for painting regardless of style settings.</param>
public static void PaintText(ElementStyleDisplayInfo e, string text, Font defaultFont, bool useDefaultFont)
{
PaintText(e, text, defaultFont, useDefaultFont, e.Style.TextFormat);
}
/// <summary>
/// Paints text for given style.
/// </summary>
/// <param name="e">Display information.</param>
/// <param name="text"><Text to paint./param>
/// <param name="defaultFont">Default font if no font by style is specified.</param>
/// <param name="useDefaultFont">Specifies whether to use default font for painting regardless of style settings.</param>
public static void PaintText(ElementStyleDisplayInfo e, string text, Font defaultFont, bool useDefaultFont, eTextFormat textFormat)
{
Rectangle textBounds = e.Bounds;
ElementStyle style = GetElementStyle(e.Style);
if (text == "" || textBounds.IsEmpty || style.TextColor.IsEmpty)
return;
Font font = style.Font;
后面还有 1226 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。