📄 ctabcontrolstyle.cs
字号:
namespace Imps.Client.Pc.XControlStyle
{
using Imps.Client.Pc.Theme;
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
public class CTabControlStyle : StyleBase
{
private Color _BackColor;
private Color _BorderColor;
private Image _scrollButtonImage;
private Image _tabAreaBackground;
private ImageList _TabBackground;
private int _TabHeight;
private int _TabSize;
protected override void LoadStyle(XmlElement elem)
{
foreach (XmlAttribute attribute in elem.Attributes)
{
switch (attribute.Name)
{
case "TabSize":
{
int.TryParse(attribute.Value, ref this._TabSize);
continue;
}
case "BackColor":
{
this.BackColor = ThemeManager.GetColor(attribute.Value);
continue;
}
case "BorderColor":
{
this.BorderColor = ThemeManager.GetColor(attribute.Value);
continue;
}
case "TabBackground":
{
this.TabBackground = ThemeManager.GetImageList(attribute.Value, 3);
continue;
}
case "TabHeight":
{
int.TryParse(attribute.Value, ref this._TabHeight);
continue;
}
case "TabAreaBackground":
{
this.TabAreaBackground = ThemeManager.GetImage(attribute.Value);
continue;
}
case "ScrollButtonImage":
{
this.ScrollButtonImage = ThemeManager.GetImage(attribute.Value);
continue;
}
}
}
}
protected override void SetDefaultValue()
{
this._TabSize = 0x40;
this._BackColor = SystemColors.Control;
this._BorderColor = Color.Gray;
this._TabBackground = null;
}
public Color BackColor
{
get
{
return this._BackColor;
}
set
{
this._BackColor = value;
}
}
public Color BorderColor
{
get
{
return this._BorderColor;
}
set
{
this._BorderColor = value;
}
}
public Image ScrollButtonImage
{
get
{
return this._scrollButtonImage;
}
set
{
this._scrollButtonImage = value;
}
}
public Image TabAreaBackground
{
get
{
return this._tabAreaBackground;
}
set
{
this._tabAreaBackground = value;
}
}
public ImageList TabBackground
{
get
{
return this._TabBackground;
}
set
{
this._TabBackground = value;
}
}
public int TabHeight
{
get
{
return this._TabHeight;
}
set
{
this._TabHeight = value;
}
}
public int TabSize
{
get
{
return this._TabSize;
}
set
{
if (value < 20)
{
this._TabSize = 20;
}
else if (value > 100)
{
this._TabSize = 100;
}
else
{
this._TabSize = value;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -