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);
        }
예제 #2
0
 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); }));
 }
예제 #3
0
 public LeapController(ILeapMotionService leapMotionService)
 {
     this.leapMotionService = leapMotionService;
 }