Source/ColorPickerItem/ColorCombControl.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace DevComponents.DotNetBar.ColorPickerItem
{
[ToolboxItem(false)]
internal class ColorCombControl : System.Windows.Forms.UserControl
{
#region Events
public event EventHandler SelectedColorChanged;
#endregion
#region Private Variables
private CombCell[] m_ColorCombs = new CombCell[144];
private const float YOffset = .824f;
private float[] arrXOffset = new float[] { -0.5f, -1.0f, -0.5f, 0.5f, 1.0f, 0.5f };
private float[] arrYOffset = new float[] { YOffset, 0.0f, -YOffset, -YOffset, 0.0f, YOffset };
private int CombDepth = 7;
private int m_MouseOverIndex = -1;
private int m_SelectedIndex = -1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
#endregion
#region Constructor, Dispose
public ColorCombControl()
{
for (int i = 0; i < m_ColorCombs.Length; i++)
m_ColorCombs[i] = new CombCell();
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.Opaque, true);
this.SetStyle(DisplayHelp.DoubleBufferFlag, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
后面还有 259 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。