📄 xbuttonstyle.cs
字号:
namespace Imps.Client.Pc.XControlStyle
{
using Imps.Client.Pc.Theme;
using Imps.Client.Utils;
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
public class XButtonStyle : StyleBase
{
private ImageList _Background;
public Bitmap _backGroundBmp;
private Color _textColor = Color.Black;
public override void ChangeColor(int hue, double sat, double lum)
{
HSLFilter.ChangeImageColor(ref this._backGroundBmp, hue, sat, lum, new RGB(0xff, 0, 0xff));
this._Background = ThemeManager.GetImageList(this._backGroundBmp, 4, 1);
base.ChangeColor(hue, sat, lum);
}
protected override void LoadStyle(XmlElement elem)
{
if (elem.HasAttribute("Background"))
{
string fileName = elem.GetAttribute("Background");
this._backGroundBmp = (Bitmap) Image.FromFile(ThemeManager.GetImagePath(fileName));
this.Background = ThemeManager.GetImageList(elem.GetAttribute("Background"), 4);
}
if (elem.HasAttribute("TextColor"))
{
this._textColor = ThemeManager.GetColor(elem.GetAttribute("TextColor"));
}
}
protected override void SetDefaultValue()
{
base.SetDefaultValue();
this._textColor = Color.Black;
}
public ImageList Background
{
get
{
return this._Background;
}
set
{
this._Background = value;
}
}
public Color TextColor
{
get
{
return this._textColor;
}
}
public Color TransparentColor
{
get
{
return Color.FromArgb(0xff, 0xff, 0, 0xff);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -