Source/Editors/DateTimeAdv/DayLabelItem.cs
(开头部分) 37KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Text;
using System.Data;
using System.Drawing;
using System.ComponentModel;
using System.Drawing.Drawing2D;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;
namespace DevComponents.Editors.DateTimeAdv
{
public class DayLabel : PopupItem
{
#region Private Variables
private ElementStyle _BackgroundStyle = new ElementStyle();
private Rectangle _ImageRenderBounds = Rectangle.Empty;
#endregion
#region Events
/// <summary>
/// Occurs when label is rendered and it allows you to override default rendering.
/// </summary>
public event DayPaintEventHandler PaintLabel;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the DayLabel class.
/// </summary>
public DayLabel()
{
_BackgroundStyle.StyleChanged += new EventHandler(BackgroundStyleChanged);
MouseUpNotification = true;
}
#endregion
#region Internal Implementation
public override void Paint(ItemPaintArgs p)
{
DayPaintEventArgs e = new DayPaintEventArgs(p, this);
OnPaintLabel(e);
if (e.RenderParts == eDayPaintParts.None) return;
SingleMonthCalendar month = this.Parent as SingleMonthCalendar;
if (month != null)
{
month.OnPaintLabel(this, e);
}
if (e.RenderParts == eDayPaintParts.None) return;
if (this.Enabled && (e.RenderParts & eDayPaintParts.Background) == eDayPaintParts.Background)
PaintBackground(p);
if ((e.RenderParts & eDayPaintParts.Text) == eDayPaintParts.Text)
PaintText(p, null, Color.Empty, _TextAlign);
if ((e.RenderParts & eDayPaintParts.Image) == eDayPaintParts.Image)
PaintImage(p, _Image, _ImageAlign);
}
后面还有 892 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。