Source/SideBarPanelControlHost.cs

(开头部分) 18KB

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

using System;
using System.Windows.Forms;
using System.Drawing;
using DevComponents.DotNetBar.Rendering;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Summary description for SideBarPanelControl.
	/// </summary>
	[System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false),System.Runtime.InteropServices.ComVisible(false)]
	public class SideBarPanelControlHost:Control,IThemeCache
	{
		private SideBarPanelItem m_ParentPanel=null;
		private BaseItem m_HotSubItem=null;
		private Point m_MouseDownPt=Point.Empty;

		// Theme Caching Support
		private ThemeWindow m_ThemeWindow=null;
		private ThemeRebar m_ThemeRebar=null;
		private ThemeToolbar m_ThemeToolbar=null;
		private ThemeHeader m_ThemeHeader=null;
		private ThemeScrollBar m_ThemeScrollBar=null;
		private ThemeExplorerBar m_ThemeExplorerBar=null;
		private ThemeProgress m_ThemeProgress=null;
        private ThemeButton m_ThemeButton = null;
		private ScrollButton m_TopScrollButton=null;
		private ScrollButton m_BottomScrollButton=null;

		public SideBarPanelControlHost(SideBarPanelItem parentPanel)
		{
			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;
			
			m_TopScrollButton=new ScrollButton();
			m_TopScrollButton.UseTimer=false;
			m_TopScrollButton.StandardButton=true;
			m_TopScrollButton.Visible=false;
			m_TopScrollButton.Orientation=eOrientation.Vertical;
			m_TopScrollButton.ButtonAlignment=eItemAlignment.Near;
			ColorScheme scheme=null;
			if(parentPanel.Appearance==eSideBarAppearance.Flat)
			{
				m_TopScrollButton.Size=new Size(14,14);
				if(parentPanel.HeaderStyle!=null)
				{
					scheme=new ColorScheme();
					scheme.ItemBackground=Color.Empty;
                    scheme.ItemBackground=Color.Empty;
					scheme.ItemBackground=parentPanel.HeaderStyle.BackColor1.Color;
					scheme.ItemHotBackground=parentPanel.HeaderStyle.BackColor1.Color;
					scheme.ItemHotBackground2=parentPanel.HeaderStyle.BackColor2.Color;
					scheme.ItemHotBorder=parentPanel.HeaderStyle.BorderColor.Color;
					scheme.ItemPressedBorder=parentPanel.HeaderStyle.BorderColor.Color;
					scheme.ItemText=parentPanel.HeaderStyle.ForeColor.Color;
                    scheme.ItemHotText=parentPanel.HeaderStyle.ForeColor.Color;
后面还有 586 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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