Ejemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.Control.Paint"/> event.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
        protected override void OnPaint(PaintEventArgs e)
        {
            var g = e.Graphics;

            g.SmoothingMode      = SmoothingMode.HighQuality;
            g.CompositingQuality = CompositingQuality.HighQuality;
            g.InterpolationMode  = InterpolationMode.HighQualityBicubic;
            BufferedPaint.PaintAnimation(g, this, e.ClipRectangle, PaintAction, TranslateState(LastState), TranslateState(State), GetDuration);
        }
Ejemplo n.º 2
0
            nint _WndProc(wnd w, int msg, nint wParam, nint lParam)
            {
                //var pmo = new PrintMsgOptions(Api.WM_NCHITTEST, Api.WM_SETCURSOR, Api.WM_MOUSEMOVE, Api.WM_NCMOUSEMOVE, 0x10c1);
                //if (WndUtil.PrintMsg(out string s, _w, msg, wParam, lParam, pmo)) print.it("<><c green>" + s + "<>");

                switch (msg)
                {
                case Api.WM_NCDESTROY:
                    _w = default;
                    break;

                //case Api.WM_NCHITTEST: //never mind: if in Popup, probably click closes. Currently not using in popups.
                //	return Api.HTTRANSPARENT;
                case Api.WM_LBUTTONDOWN:
                    _WmLbuttondown(lParam);
                    break;

                case Api.WM_PAINT:
                    using (var bp = new BufferedPaint(w, true)) _Paint(bp.DC);
                    return(default);
                }

                return(Api.DefWindowProc(w, msg, wParam, lParam));
            }
Ejemplo n.º 3
0
 protected override void OnPaint(PaintEventArgs pe)
 {
     BufferedPaint.PaintAnimation(pe.Graphics, this, pe.ClipRectangle, PaintAction, LastButtonState, ButtonState, GetDuration, this.BuildTextFormatFlags());
     base.OnPaint(pe);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Raises the <see cref="E:System.Windows.Forms.Control.Paint" /> event.
 /// </summary>
 /// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs" /> that contains the event data.</param>
 protected override void OnPaint(PaintEventArgs e)
 {
     base.OnPaint(e);
     BufferedPaint.PaintAnimation(e.Graphics, this, ClientRectangle, PaintControl, currentState, Enabled ? newState : ComboBoxState.Disabled, (a, b) => vsr.GetTransitionDuration((int)a, (int)b));
 }