Exemplo n.º 1
0
        public GMRCard()
        {
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
            DoubleBuffered = true;
            Size           = new Size(250, 200);
            curtainHeight  = Height - 60;

            Font      = new Font("Verdana", 9F, FontStyle.Regular);
            BackColor = Color.White;

            animationCurtain       = new GMR.Animation.Animation.Animation();
            animationCurtain.Value = curtainHeight;
        }
Exemplo n.º 2
0
        private void DoCurtainAnimation()
        {
            if (mouseEntered)
            {
                animationCurtain = new GMR.Animation.Animation.Animation("Curtain_" + Handle, Invalidate, animationCurtain.Value, 50);
            }
            else
            {
                animationCurtain = new GMR.Animation.Animation.Animation("Curtain_" + Handle, Invalidate, animationCurtain.Value, curtainHeight);
            }

            animationCurtain.stepDevider = 6;
            Animator.Request(animationCurtain, true);
        }
Exemplo n.º 3
0
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);
            if (Height <= 100)
            {
                Height = 100;
            }
            if (Width <= 100)
            {
                Width = 100;
            }
            curtainHeight = Height - 60;

            animationCurtain       = new GMR.Animation.Animation.Animation();
            animationCurtain.Value = curtainHeight;

            Invalidate();
        }