Esempio n. 1
0
        private void UpdateProperty()
        {
            NeonNext next;

            if (_playImmediately != null)
            {
                next             = _playImmediately;
                _playImmediately = null;
            }
            else
            {
                if (_nextQueue.Count == 0)
                {
                    return;
                }
                next = _nextQueue.Dequeue();
            }

            if (next.TextChanged)
            {
                Text = next.Text;
            }
            if (next.Animation != null)
            {
                Animation = (NeonAnimation)next.Animation;
            }
            if (next.IntervalChanged)
            {
                Interval = next.Interval;
            }
            if (next.Duration != null)
            {
                Duration = (TimeSpan)next.Duration;
            }
        }
Esempio n. 2
0
 public void Play(string text)
 {
     _playImmediately = new NeonNext()
     {
         Text = text
     };
     StartTimer(true);
 }
Esempio n. 3
0
 public void Play(string text, NeonAnimation animation)
 {
     _playImmediately = new NeonNext()
     {
         Text      = text,
         Animation = animation,
     };
     StartTimer(true);
 }
Esempio n. 4
0
 public void Play(string text, NeonAnimation animation, TimeSpan duration, TimeSpan?interval)
 {
     _playImmediately = new NeonNext()
     {
         Text      = text,
         Animation = animation,
         Duration  = duration,
         Interval  = interval,
     };
     StartTimer(true);
 }