Beispiel #1
0
        public static WindowTransitionOperation Create(
            WndTopLevelWindow window,
            WindowTransitionWindow transitionWindow,
            TimeSpan currentTime)
        {
            var element   = window.Root.FindChild(transitionWindow.WinName);
            var startTime = currentTime + TimeSpan.FromSeconds(transitionWindow.FrameDelay / 30.0f);

            switch (transitionWindow.Style)
            {
            case WindowTransitionStyle.WinFade:
                return(new WinFadeTransition(element, startTime));

            case WindowTransitionStyle.Flash:
                return(new FlashTransition(element, startTime));

            case WindowTransitionStyle.ButtonFlash:
                return(new ButtonFlashTransition(element, startTime));

            case WindowTransitionStyle.WinScaleUp:
                return(new WinScaleUpTransition(element, startTime));

            case WindowTransitionStyle.ReverseSound:
                return(new ReverseSoundTransition(element, startTime));

            default:
                throw new NotImplementedException();
            }
        }
Beispiel #2
0
        public static WindowTransitionOperation Create(
            Window window,
            WindowTransitionWindow transitionWindow,
            TimeSpan currentTime)
        {
            var element   = window.Controls.FindControl(transitionWindow.WinName);
            var startTime = currentTime + TimeSpan.FromSeconds(transitionWindow.FrameDelay / 30.0f);

            switch (transitionWindow.Style)
            {
            case WindowTransitionStyle.WinFade:
                return(new WinFadeTransition(element, startTime));

            case WindowTransitionStyle.Flash:
                return(new FlashTransition(element, startTime));

            case WindowTransitionStyle.ButtonFlash:
                return(new ButtonFlashTransition(element, startTime));

            case WindowTransitionStyle.WinScaleUp:
                return(new WinScaleUpTransition(element, startTime));

            case WindowTransitionStyle.ReverseSound:
                return(new ReverseSoundTransition(element, startTime));

            case WindowTransitionStyle.MainMenuScaleUp:
            case WindowTransitionStyle.MainMenuMediumScaleUp:     // TODO
                return(new MainMenuScaleUpTransition(element, startTime));

            case WindowTransitionStyle.TypeText:
                return(new TypeTextTransition(element, startTime));

            default:
                throw new NotImplementedException();
            }
        }