public void Next(string text, NeonAnimation animation) { _nextQueue.Enqueue(new NeonNext() { Text = text, Animation = animation, }); StartTimer(false); }
public void Play(string text, NeonAnimation animation) { _playImmediately = new NeonNext() { Text = text, Animation = animation, }; StartTimer(true); }
public void Next(string text, NeonAnimation animation, TimeSpan duration, TimeSpan?interval) { _nextQueue.Enqueue(new NeonNext() { Text = text, Animation = animation, Duration = duration, Interval = interval, }); StartTimer(false); }
public void Play(string text, NeonAnimation animation, TimeSpan duration, TimeSpan?interval) { _playImmediately = new NeonNext() { Text = text, Animation = animation, Duration = duration, Interval = interval, }; StartTimer(true); }
private void PlayStoryboard(Action completeAction) { switch (Animation) { case NeonAnimation.Notice: _storyboard = CreateNoticeStoryboard(); break; case NeonAnimation.Marble: _storyboard = CreateMarbleStoryboard(); break; case NeonAnimation.Barrage: _storyboard = CreateBarrageStoryboard(); break; case NeonAnimation.Conspicuous: _storyboard = CreateConspicuousStoryboard(); break; case NeonAnimation.FadeNext: _storyboard = CreateFadeNextStoryboard(); break; default: return; } if (_storyboard == null) { completeAction?.Invoke(); return; } _lastAnimation = Animation; if (BeginTime != null) { _storyboard.BeginTime = BeginTime; } _storyboard.Completed += delegate { completeAction?.Invoke(); }; _storyboard.Begin(); }