public void Stop() { GripItService.Stop(); Started = false; if (_animationSchedulerSubscription != null) { _animationSchedulerSubscription.Dispose(); _animationSchedulerSubscription = null; } }
public void Start() { GripItService.Start(); Started = true; _animationSchedulerSubscription = Observable.Timer(TimeSpan.Zero, TimeSpan.FromMilliseconds(RefreshInterval)) .Do(_ => Application.Current.Dispatcher.Invoke(Animate)) .Select(_ => Observable.Timer(TimeSpan.FromMilliseconds(AnimationDuration))) .Switch() .Subscribe(); }
public void Stop() { GripItService.Stop(); Started = false; }
public void Start() { GripItService.Start(); Started = true; }