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; } }
public void Play(string text) { _playImmediately = new NeonNext() { Text = text }; StartTimer(true); }
public void Play(string text, NeonAnimation animation) { _playImmediately = new NeonNext() { Text = text, Animation = animation, }; StartTimer(true); }
public void Play(string text, NeonAnimation animation, TimeSpan duration, TimeSpan?interval) { _playImmediately = new NeonNext() { Text = text, Animation = animation, Duration = duration, Interval = interval, }; StartTimer(true); }