Exemple #1
0
 public void DisplayScene01(string sceneId, string background, string text, int textBrightness, int textOutlineBrightness, int animateIn, int pauseTime, int animateOut)
 {
     _flexDMD.Post(() =>
     {
         var font            = GetFont(_singleLineFont[0].Path, textBrightness / 15f, textOutlineBrightness / 15f);
         var scene           = new SingleLineScene(ResolveImage(background, false), text, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, true, sceneId);
         _scoreBoard.Visible = false;
         _queue.Visible      = true;
         _queue.Enqueue(scene);
     });
 }
Exemple #2
0
 public void DisplayScene00ExWithId(string sceneId, bool cancelPrevious, string background, string toptext, int topBrightness, int topOutlineBrightness, string bottomtext, int bottomBrightness, int bottomOutlineBrightness, int animateIn, int pauseTime, int animateOut)
 {
     _flexDMD.Post(() =>
     {
         if (LOG_DEBUG)
         {
             log.Debug("DisplayScene00ExWithId '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}' {12}", sceneId, cancelPrevious, background, toptext, topBrightness, topOutlineBrightness, bottomtext, bottomBrightness, bottomOutlineBrightness, animateIn, pauseTime, animateOut, DateTimeOffset.Now.ToUnixTimeMilliseconds());
         }
         if (cancelPrevious && sceneId != null && sceneId.Length > 0)
         {
             var s = _queue.ActiveScene;
             if (s != null && s.Name == sceneId)
             {
                 _queue.RemoveScene(sceneId);
             }
         }
         _scoreBoard.Visible = false;
         _queue.Visible      = true;
         if (toptext != null && toptext.Length > 0 && bottomtext != null && bottomtext.Length > 0)
         {
             var fontTop    = GetFont(_twoLinesFontTop.Path, topBrightness / 15f, topOutlineBrightness / 15f);
             var fontBottom = GetFont(_twoLinesFontBottom.Path, bottomBrightness / 15f, bottomOutlineBrightness / 15f);
             var scene      = new TwoLineScene(ResolveImage(background, true), toptext, fontTop, bottomtext, fontBottom, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId);
             _queue.Enqueue(scene);
         }
         else if (toptext != null && toptext.Length > 0)
         {
             var font  = GetFittedLabel(toptext, topBrightness / 15f, topOutlineBrightness / 15f).Font;
             var scene = new SingleLineScene(ResolveImage(background, true), toptext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId);
             _queue.Enqueue(scene);
         }
         else if (bottomtext != null && bottomtext.Length > 0)
         {
             var font  = GetFittedLabel(bottomtext, bottomBrightness / 15f, bottomOutlineBrightness / 15f).Font;
             var scene = new SingleLineScene(ResolveImage(background, true), bottomtext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId);
             _queue.Enqueue(scene);
         }
         else
         {
             var scene = new BackgroundScene(ResolveImage(background, true), (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId);
             _queue.Enqueue(scene);
         }
     });
 }
Exemple #3
0
 public void DisplayScene00ExWithId(string sceneId, bool cancelPrevious, string background, string toptext, int topBrightness, int topOutlineBrightness, string bottomtext, int bottomBrightness, int bottomOutlineBrightness, int animateIn, int pauseTime, int animateOut)
 {
     _flexDMD.Post(() =>
     {
         if (cancelPrevious && sceneId != null && sceneId.Length > 0)
         {
             var s = _queue.ActiveScene;
             if (s != null && s.Name == sceneId)
             {
                 _queue.RemoveScene(sceneId);
             }
         }
         _scoreBoard.Visible = false;
         _queue.Visible      = true;
         if (toptext != null && toptext.Length > 0 && bottomtext != null && bottomtext.Length > 0)
         {
             var fontTop    = GetFont(_twoLinesFontTop.Path, topBrightness / 15f, topOutlineBrightness / 15f);
             var fontBottom = GetFont(_twoLinesFontBottom.Path, bottomBrightness / 15f, bottomOutlineBrightness / 15f);
             var scene      = new TwoLineScene(ResolveImage(background, true), toptext, fontTop, bottomtext, fontBottom, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId);
             _queue.Enqueue(scene);
         }
         else if (toptext != null && toptext.Length > 0)
         {
             var font  = GetFittedLabel(toptext, topBrightness / 15f, topOutlineBrightness / 15f).Font;
             var scene = new SingleLineScene(ResolveImage(background, true), toptext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId);
             _queue.Enqueue(scene);
         }
         else if (bottomtext != null && bottomtext.Length > 0)
         {
             var font  = GetFittedLabel(bottomtext, bottomBrightness / 15f, bottomOutlineBrightness / 15f).Font;
             var scene = new SingleLineScene(ResolveImage(background, true), bottomtext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId);
             _queue.Enqueue(scene);
         }
         else
         {
             var scene = new BackgroundScene(ResolveImage(background, true), (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId);
             _queue.Enqueue(scene);
         }
     });
 }