Source/ScrollBar/ScrollBarCore.cs
(开头部分) 24KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace DevComponents.DotNetBar.ScrollBar
{
public class ScrollBarCore : IDisposable
{
#region Private Variables
private Rectangle m_DisplayRectangle = Rectangle.Empty;
private eOrientation m_Orientation = eOrientation.Vertical;
// Default thumb sizes...
private Size m_VThumbSize = new Size(15, 17);
private Size m_HThumbSize = new Size(17, 15);
private Rectangle m_ThumbDecrease = Rectangle.Empty;
private Rectangle m_ThumbIncrease = Rectangle.Empty;
private Rectangle m_Track = Rectangle.Empty;
private eScrollPart m_MouseOverPart = eScrollPart.None;
private Control m_ParentControl = null;
private bool m_MouseDown = false;
private Timer m_ClickTimer = null;
private int m_MouseDownTrackOffset = 0;
private Bitmap m_CashedView = null;
private bool m_ViewExpired = true;
private bool m_PassiveScrollBar = false;
private bool m_IsAppScrollBarStyle = false;
public event EventHandler ValueChanged;
private bool m_IsScrollBarParent = false;
private bool m_IsAdvScrollBar = false;
private int m_AutoClickCount = 0;
public event ScrollEventHandler Scroll;
#endregion
#region Internal Implementation
public ScrollBarCore() : this(null) { }
public ScrollBarCore(Control parentControl) : this(parentControl, false) { }
public ScrollBarCore(Control parentControl, bool isPassive)
{
m_ParentControl = parentControl;
m_IsScrollBarParent = m_ParentControl is System.Windows.Forms.ScrollBar || m_ParentControl is ScrollBarAdv;
m_IsAdvScrollBar = m_ParentControl is ScrollBarAdv;
m_PassiveScrollBar = isPassive;
DisposeCashedView();
}
internal void DisposeCashedView()
{
if (m_CashedView != null)
{
m_CashedView.Dispose();
m_CashedView = null;
}
}
public void Paint(ItemPaintArgs p)
后面还有 689 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。