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();
 }
示例#3
0
 public void Stop()
 {
     GripItService.Stop();
     Started = false;
 }
示例#4
0
 public void Start()
 {
     GripItService.Start();
     Started = true;
 }