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

📄 wndlessstatusbar.cs

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

    public class WndlessStatusBar : XFormWndlessLabel
    {
        private System.Windows.Forms.Cursor _cursor;
        private string _link;
        private Image _logo;
        private int _textLength;

        public WndlessStatusBar(string text) : base(text)
        {
            this._cursor = Cursors.Hand;
            base.ForeColor = Color.Red;
            base.TextFont = new Font("宋体", 9f);
        }

        private bool isItem(Point pt)
        {
            int num = base.Left + this._textLength;
            return (((pt.X >= (base.Left + base.Padding.get_Left())) && (pt.X <= (num + base.Padding.get_Left()))) || (((this._logo != null) && (pt.X >= base.Left)) && (pt.X <= (base.Left + base.Height))));
        }

        public override bool OnMouseDown(MouseEventArgs e)
        {
            if (base.Visible && this.isItem(e.get_Location()))
            {
                base.RaiseClick(base._parent, e);
                return true;
            }
            return false;
        }

        public override void OnMouseLeave(EventArgs e)
        {
            base._parent.Cursor = Cursors.Default;
        }

        public override bool OnMouseMove(MouseEventArgs e)
        {
            if (!base.Visible)
            {
                return false;
            }
            if (this.isItem(e.get_Location()))
            {
                base._parent.Cursor = this._cursor;
            }
            else
            {
                base._parent.Cursor = Cursors.Default;
            }
            return true;
        }

        public override void OnPaint(Graphics g, Rectangle clipRectangle)
        {
            if (base.Visible && !base.NonClientArea)
            {
                Rectangle rect = base.Rectangle;
                if (clipRectangle.IntersectsWith(rect))
                {
                    if (this._logo != null)
                    {
                        g.DrawImage(this._logo, base.Location.X + 3, base.Location.Y, base.Height, base.Height);
                        rect.X = (base.Location.X + 6) + base.Height;
                        rect.Width = base.Rectangle.Right - rect.Left;
                    }
                    Size size = base.PaintText(g, rect);
                    this._textLength = size.Width;
                }
            }
        }

        public System.Windows.Forms.Cursor Cursor
        {
            get
            {
                return this._cursor;
            }
            set
            {
                this._cursor = value;
            }
        }

        public string Link
        {
            get
            {
                return this._link;
            }
            set
            {
                this._link = value;
            }
        }

        public Image Logo
        {
            get
            {
                return this._logo;
            }
            set
            {
                this._logo = value;
            }
        }
    }
}

⌨️ 快捷键说明

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