Exemple #1
0
        public WindowExitAnimation(BaseWindow window, int width, int height)
        {
            this.window    = window;
            this.width     = width;
            this.halfWidth = width / 2;
            this.height    = height;
            Timer timer = new Timer();

            timer.Interval = 16;
            timer.Tick    += Timer_Tick;
            timer.Enabled  = true;
        }
        public WindowStartupAnimation(BaseWindow window, int width, int height, int ribbonHeight, Action animationEnded)
        {
            this.window         = window;
            this.width          = width;
            this.height         = height;
            this.initY          = height / 2 - PADDING - ribbonHeight;
            this.ribbonHeight   = ribbonHeight;
            this.initHeight     = (ribbonHeight + PADDING) * 2;
            this.initialX       = width / 2 - 5;
            this.animationEnded = animationEnded;
            Timer timer = new Timer();

            timer.Interval = 16;
            timer.Tick    += timerTick;
            timer.Enabled  = true;
        }