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

📄 elementstatic.cs

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

    public class ElementStatic : Element
    {
        public ElementStatic()
        {
            base._style = new ElementStaticStyle();
            base.HandleMouse = false;
        }

        public override void OnPaint(PaintEventArgs e)
        {
            if (base.Visible)
            {
                Graphics graphics = e.Graphics;
                Image image = this.Style.Image;
                if (image != null)
                {
                    if (this.Style.TransParentColor != null)
                    {
                        ImageAttributes imageAttr = new ImageAttributes();
                        imageAttr.SetColorKey(this.Style.TransParentColor.Color, this.Style.TransParentColor.Color);
                        graphics.DrawImage(image, new Rectangle(this._location.X, this._location.Y, image.Width, image.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, imageAttr);
                    }
                    else
                    {
                        graphics.DrawImage(image, new Rectangle(this._location.X, this._location.Y, image.Width, image.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
                    }
                }
            }
        }

        public override void OnSizeChanged(int w, int h)
        {
            base._size = this.Style._size;
            base._location = EStyleBase.StyleLocationToWindowLocation(this.Style._location, this.Style._xAlignment, this.Style._yAlignment, new Size(w, h));
        }

        public ElementStaticStyle Style
        {
            get
            {
                return (ElementStaticStyle) base._style;
            }
        }
    }
}

⌨️ 快捷键说明

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