예제 #1
0
        /// <summary>
        /// Show text to the preview and projector
        /// </summary>
        private void DisplayText(string text)
        {
            //update for the projector
            winDis.DisplayText(text, transitionSpeed);

            //update text, do fade effect
            if (txtbPreview.Opacity == 0)
            {
                txtbPreview2.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
                //check Bilingual
                if (Common.appConfig.Bilingual && text.Contains('@'))
                {
                    txtbPreview.Text = "";
                    string[] str = text.Split('@');
                    txtbPreview.Inlines.Add(new Run(str[0])
                    {
                        Foreground = Brushes.Yellow
                    });
                    txtbPreview.Inlines.Add(new Run(str[1])
                    {
                        Foreground = Brushes.White
                    });
                }
                else
                {
                    txtbPreview.Text = text;
                }
                txtbPreview.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(0, 1, transitionSpeed));
            }
            else
            {
                txtbPreview.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
                //check Bilingual
                if (Common.appConfig.Bilingual && text.Contains('@'))
                {
                    txtbPreview2.Text = "";
                    string[] str = text.Split('@');
                    txtbPreview2.Inlines.Add(new Run(str[0])
                    {
                        Foreground = Brushes.Yellow
                    });
                    txtbPreview2.Inlines.Add(new Run(str[1])
                    {
                        Foreground = Brushes.White
                    });
                }
                else
                {
                    txtbPreview2.Text = text;
                }
                txtbPreview2.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(0, 1, transitionSpeed));
            }
        }
예제 #2
0
 private void tgbtnControlDisplayText_Unchecked(object sender, RoutedEventArgs e)
 {
     winDis.HideText(transitionSpeed);
     grdText.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
 }
예제 #3
0
 private void tgbtnControlSleep_Unchecked(object sender, RoutedEventArgs e)
 {
     winDis.HideBlackCover(transitionSpeed);
     recBlackCover.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
 }
예제 #4
0
 /// <summary>
 /// Hide text
 /// </summary>
 public void HideText(double transitionSpeed)
 {
     grdText.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
 }
예제 #5
0
 /// <summary>
 /// Hide black cover for normal mode
 /// </summary>
 public void HideBlackCover(double transitionSpeed)
 {
     recBlackCover.BeginAnimation(OpacityProperty, CustomAnimation.GetDouble(1, 0, transitionSpeed));
 }