Andwho.Windows.Forms._360Form.OnPaint C# (CSharp) Метод

OnPaint() защищенный Метод

引发 System.Windows.Forms.Form.Paint 事件。
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs 包含事件数据的 System.Windows.Forms.PaintEventArgs。
Результат void
        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            g.SmoothingMode = SmoothingMode.AntiAlias;

            Rectangle rect = this.ClientRectangle;

            switch (base.SysButton)
            {
                case ESysButton.Normal:
                    this.DrawSysButton(g, this.CloseRect, this._closeImage, base.CloseState);
                    if (base.WindowState != FormWindowState.Maximized)
                        this.DrawSysButton(g, this.MaxRect, this._maxImage, base.MaxState);
                    else
                        this.DrawSysButton(g, this.MaxRect, this._restoreImage, base.MaxState);
                    this.DrawSysButton(g, this.MiniRect, this._minImage, base.MinState);
                    break;
                case ESysButton.Close:
                    this.DrawSysButton(g, this.CloseRect, this._closeImage, base.CloseState);
                    break;
                case ESysButton.Close_Mini:
                    this.DrawSysButton(g, this.CloseRect, this._closeImage, base.CloseState);
                    this.DrawSysButton(g, this.MiniRect, this._minImage, base.MinState);
                    break;
            }
            // 绘制标题栏菜单按钮
            this.DrawSysButton(g, this.TitleBarMenuRect, (Bitmap)this._titleBarMenuImage, this._titleBarMenuState);

            this.DrawFrameBorder(g);
            base.OnPaint(e);
        }