⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listcontroltoolbarstyle.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Pc
{
    using Imps.Client.Pc.Theme;
    using Imps.Client.Utils;
    using Imps.Utils;
    using System;
    using System.Drawing;
    using System.Xml;

    public class ListControlToolbarStyle : EStyleBase
    {
        private Color _clrBarInner;
        private Color _clrBarOuter;
        private Color _clrThumbInner;
        private Color _clrThumbOuter;
        private Color _clrThumbPen;
        private Bitmap _imgBg;
        private Image _imgTrackerContact;
        private Image _imgTrackerGroup;
        private static ListControlToolbarStyle _instance = new ListControlToolbarStyle();
        private Imps.Client.Utils.RGB _transParentColor;

        public ListControlToolbarStyle()
        {
            this.LoadDefault();
        }

        public override void ChangeColor(int hue, double sat, double lum)
        {
            if (this._imgBg != null)
            {
                HSLFilter.ChangeImageColor(ref this._imgBg, hue, sat, lum, this.TransParentColor);
            }
        }

        private void LoadDefault()
        {
            this._clrThumbOuter = Color.Transparent;
            this._clrThumbInner = Color.Transparent;
            this._clrBarOuter = Color.Transparent;
            this._clrBarInner = Color.Transparent;
            this._clrThumbPen = Color.Transparent;
            this._imgBg = null;
            this._imgTrackerContact = null;
            this._imgTrackerGroup = null;
        }

        protected override void LoadStyle(XmlElement elem)
        {
            this.LoadDefault();
            string fileName = XmlHelper.ReadXmlAttributeString(elem, "background");
            if (!string.IsNullOrEmpty(fileName))
            {
                this._imgBg = (Bitmap) Image.FromFile(ThemeManager.GetImagePath(fileName));
            }
            int? nullable = null;
            if (elem.HasAttribute("transColor"))
            {
                nullable = new int?(Convert.ToInt32(elem.GetAttribute("transColor"), 0x10));
            }
            if (nullable.get_HasValue())
            {
                this._transParentColor = new Imps.Client.Utils.RGB(Color.FromArgb(0xff, Color.FromArgb(nullable.get_Value())));
            }
        }

        public Image BackgoundImage
        {
            get
            {
                return this._imgBg;
            }
        }

        public Color BarInnerColor
        {
            get
            {
                return this._clrBarInner;
            }
        }

        public Color BarOuterColor
        {
            get
            {
                return this._clrBarOuter;
            }
        }

        public Image ContactTrackerImage
        {
            get
            {
                return this._imgTrackerContact;
            }
        }

        public Image GroupTrackerImage
        {
            get
            {
                return this._imgTrackerGroup;
            }
        }

        public static ListControlToolbarStyle Instance
        {
            get
            {
                return _instance;
            }
        }

        public Color ThumbInnerColor
        {
            get
            {
                return this._clrThumbInner;
            }
        }

        public Color ThumbOuterColor
        {
            get
            {
                return this._clrThumbOuter;
            }
        }

        public Color ThumbPenColor
        {
            get
            {
                return this._clrThumbPen;
            }
        }

        public Imps.Client.Utils.RGB TransParentColor
        {
            get
            {
                return this._transParentColor;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -