Source/Controls/ListViewEx.cs
(开头部分) 41KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;
using DevComponents.DotNetBar.Rendering;
using System.Globalization;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
using System.Collections;
namespace DevComponents.DotNetBar.Controls
{
/// <summary>
/// Represents the extended ListView control with the Office 2007 Style.
/// </summary>
[ToolboxBitmap(typeof(ListViewEx), "Controls.ListViewEx.ico"), ToolboxItem(true)]
public class ListViewEx : ListView, INonClientControl
{
#region Private Variables
private NonClientPaintHandler m_NCPainter = null;
private ElementStyle m_BorderStyle = null;
#endregion
#region Constructor, Dispose
public ListViewEx() : base()
{
m_BorderStyle = new ElementStyle();
m_BorderStyle.Class = ElementStyleClassKeys.ListViewBorderKey;
m_BorderStyle.StyleChanged += new EventHandler(BorderStyle_StyleChanged);
m_NCPainter = new NonClientPaintHandler(this, eScrollBarSkin.Optimized);
this.OwnerDraw = true;
this.DoubleBuffered = true;
this.BorderStyle = BorderStyle.None;
}
protected override void Dispose(bool disposing)
{
if (m_NCPainter != null)
{
m_NCPainter.Dispose();
m_NCPainter = null;
}
if (m_BorderStyle != null) m_BorderStyle.StyleChanged -= new EventHandler(BorderStyle_StyleChanged);
base.Dispose(disposing);
}
#endregion
#region Inernal Implementation
private void PaintHeaderBackground(Graphics g, Rectangle r)
{
Office2007ListViewColorTable ct = GetColorTable();
DisplayHelp.FillRectangle(g, r, ct.ColumnBackground);
using (Pen pen = new Pen(ct.Border))
{
g.DrawLine(pen, r.X, r.Bottom - 1, r.Right, r.Bottom - 1);
}
}
private HeaderHandler m_HeaderHandler = null;
后面还有 971 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。