Пример #1
0
        private void addScreen(TutorialScreen screen)
        {
            var anim = new DoubleAnimation(0, 1, TimeSpan.FromSeconds(screenFadeTime));

            screen.BeginAnimation(UIElement.OpacityProperty, anim);

            this.tutorialPanel.Children.Add(screen);
            screen.Initialise(this);
        }
Пример #2
0
        private void activateScreen(TutorialScreen screen)
        {
            if (this.activeScreen != null)
            {
                this.removeScreen(this.activeScreen, screen != null);
            }

            this.activeScreen = screen;

            if (screen != null)
            {
                this.addScreen(screen);
            }
        }
Пример #3
0
        private void removeScreen(TutorialScreen screen, bool waitForNextScreenToFadeIn)
        {
            var anim = new DoubleAnimation(0, TimeSpan.FromSeconds(screenFadeTime))
            {
                BeginTime = TimeSpan.FromSeconds(
                    waitForNextScreenToFadeIn ? screenFadeTime : 0)
            };

            anim.Completed += (sender, args) =>
            {
                this.tutorialPanel.Children.Remove(screen);
            };
            screen.BeginAnimation(UIElement.OpacityProperty, anim);

            screen.IsEnabled = false;
            screen.Cleanup();
        }