Source/Editors/VisualControlBase.cs
(开头部分) 39KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
using System.Collections;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Rendering;
namespace DevComponents.Editors
{
[ToolboxItem(false)]
public class VisualControlBase : PopupItemControl, IInputButtonControl, ISupportInitialize
{
#region Private Variables
private VisualItem _RootVisual = null;
private bool _FocusHighlightEnabled = false;
private Color _LastBackColor = Color.Empty;
private static Color _DefaultHighlightColor = Color.FromArgb(0xFF, 0xFF, 0x88);
private Color _FocusHighlightColor = _DefaultHighlightColor;
private bool _MouseOver = false;
#endregion
#region Events
/// <summary>
/// Occurs when ButtonCustom control is clicked.
/// </summary>
public event EventHandler ButtonCustomClick;
/// <summary>
/// Occurs when ButtonCustom2 control is clicked.
/// </summary>
public event EventHandler ButtonCustom2Click;
#endregion
#region Constructor
/// <summary>
/// Creates new instance of the class.
/// </summary>
public VisualControlBase()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.Opaque, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(SystemOptions.DoubleBufferFlag, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.Selectable, true);
this.IsAccessible = true;
_Colors = new InputControlColors();
_Colors.ColorChanged += new EventHandler(ColorsColorChanged);
_ButtonCustom = new InputButtonSettings(this);
_ButtonCustom2 = new InputButtonSettings(this);
_RootVisual = CreateRootVisual();
_RootVisual.ArrangeInvalid += new EventHandler(VisualArrangeInvalid);
_RootVisual.RenderInvalid += new EventHandler(VisualRenderInvalid);
后面还有 1101 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。