internal void FadeIn()
        {
            var animateOpacity = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(500));

            animateOpacity.Completed += (o, e) =>
            {
                var mainWin = Application.Current.MainWindow as MainWindow;
                mainWin.VUI.AnimateMicIntro();
                KinectController.AddHandRaisedHandler(this, new EventHandler <HandInputEventArgs>(OnHandRaised));
                ((MainWindow)Application.Current.MainWindow).SetVoiceInstruction(Settings.Default.StartVui, Settings.Default.VuiDisplayDelay);
            };

            this.Visibility = Visibility.Visible;

            this.BeginAnimation(Introduction.OpacityProperty, animateOpacity);
        }
Esempio n. 2
0
        /// <summary>
        /// 隐藏掉吸引界面,出现这个介绍界面,而且是以动画的形式渐入
        /// </summary>
        internal void FadeIn()
        {
            var animateOpacity = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(500));

            animateOpacity.Completed += (o, e) =>
            {
                var mainWin = Application.Current.MainWindow as MainWindow;
                KinectController.AddHandRaisedHandler(this, new EventHandler <HandInputEventArgs>(OnHandRaised));
            };

            this.Visibility = Visibility.Visible;
            Storyboard storyboard = (Storyboard)this.FindResource("onGoing");

            storyboard.Begin(this);
            this.BeginAnimation(Introduction.OpacityProperty, animateOpacity);
        }