public MainWindowViewModel(ILeapMotionService leapMotionService) { this.leapMotionService = leapMotionService; this._fingersDetected = leapMotionService.FingersDetected.ToProperty(this, x => x.FingersDetected); this.Disposables.Add(this._fingersDetected); this._velocity = leapMotionService.SmoothedVelocity.ToProperty(this, x => x.Velocity); this.Disposables.Add(this._velocity); }
public LeapConnection(ILeapMotionService leapMotionService) { disposables.Add( Observable.CombineLatest(leapMotionService.FingersDetected, leapMotionService.Velocity, (f, v) => new LeapStatusViewModel { FingersDetected = f, Velocity = v }) .Subscribe(vm => { if (Connection != null) Connection.Broadcast(vm); })); }
public LeapController(ILeapMotionService leapMotionService) { this.leapMotionService = leapMotionService; }