Source/TabStripVS2005DockDisplay.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Provides display capabilites for TabStrip with VS2005Dock style.
/// </summary>
internal class TabStripVS2005DockDisplay:TabStripBaseDisplay
{
#region Private Variable
private int m_xTabOffset=8;
#endregion
/// <summary>
/// Creates new instance of the class.
/// </summary>
public TabStripVS2005DockDisplay(){}
#region Methods
public override void Paint(Graphics g, TabStrip tabStrip)
{
base.Paint(g,tabStrip);
TabColorScheme colorScheme=tabStrip.ColorScheme;
Rectangle clientRect=tabStrip.DisplayRectangle;
if (tabStrip.BackColor != Color.Transparent || colorScheme.TabBackground != Color.Transparent)
{
if (colorScheme.TabPanelBackground2.IsEmpty)
{
if (!colorScheme.TabPanelBackground.IsEmpty)
{
using (SolidBrush brush = new SolidBrush(colorScheme.TabPanelBackground))
g.FillRectangle(brush, clientRect);
}
}
else
{
using (SolidBrush brush = new SolidBrush(Color.White))
g.FillRectangle(brush, clientRect);
using (LinearGradientBrush brush = CreateTabGradientBrush(clientRect, colorScheme.TabPanelBackground, colorScheme.TabPanelBackground2, colorScheme.TabPanelBackgroundGradientAngle))
g.FillRectangle(brush, clientRect);
}
}
Rectangle selectedRect = Rectangle.Empty;
if (tabStrip.SelectedTab != null)
selectedRect = tabStrip.SelectedTab.DisplayRectangle;
DrawBackground(tabStrip, clientRect,g,colorScheme,new Region(tabStrip.DisplayRectangle),tabStrip.TabAlignment, selectedRect);
tabStrip.ClipExcludeSystemBox(g);
for(int i=tabStrip.Tabs.Count-1;i>=0;i--)
{
TabItem tab=tabStrip.Tabs[i];
if(!tab.Visible || tab==tabStrip.SelectedTab || !tab.DisplayRectangle.IntersectsWith(clientRect))
continue;
后面还有 138 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。