Source/ScrollButton.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Summary description for ScrollButton.
	/// </summary>
	[ToolboxItem(false)]
	internal class ScrollButton : System.Windows.Forms.UserControl
	{
		private bool m_MouseOver=false;
		private bool m_MouseDown=false;
		private eOrientation m_Orientation=eOrientation.Horizontal;
		private eItemAlignment m_ButtonAlignment=eItemAlignment.Near;
		private System.Windows.Forms.Timer m_ScrollTimer=null;
		public ColorScheme _Scheme=null;
		private ThemeScrollBar m_ThemeScrollBar=null;

		public bool UseThemes=false;
		public bool UseTimer=true;
		public bool StandardButton=false;

		public ScrollButton()
		{
			this.SetStyle(ControlStyles.Selectable,false);
			this.SetStyle(ControlStyles.UserPaint,true);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
			this.SetStyle(ControlStyles.Opaque,true);
			this.SetStyle(ControlStyles.ResizeRedraw,true);
			this.SetStyle(DisplayHelp.DoubleBufferFlag,true);
			this.TabStop=false;
		}

		protected override void OnPaint(PaintEventArgs e)
		{
			Graphics g=e.Graphics;
			if(StandardButton)
			{
				PaintStandardButton(e);
				return;
			}

			if(m_MouseOver)
			{
				if(_Scheme==null)
				{
					using(SolidBrush brush=new SolidBrush(ColorFunctions.HoverBackColor(g)))
						g.FillRectangle(brush,this.DisplayRectangle);
					//g.Clear(ColorFunctions.HoverBackColor(g));
					NativeFunctions.DrawRectangle(g,SystemPens.Highlight,this.ClientRectangle);
				}
				else
				{
					if(!_Scheme.ItemHotBackground2.IsEmpty)
					{
后面还有 340 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。