Esempio n. 1
0
        public Milling2DControlViewModel(MovementScaleSettings scale, Communications comms, IObservable <bool> isOpen)
        {
            this.scale       = scale;
            this.comms       = comms;
            this.isOpen      = isOpen;
            this.MoveCommand = ReactiveCommand.Create <Point>(MoveTo);
            this.LineCommand = ReactiveCommand.Create <Point>(LineTo);
            var position = Observable.FromEvent <Position>(m => comms.PositionConfirmed += m, m => comms.PositionConfirmed -= m);

            position.ObserveOn(RxApp.MainThreadScheduler).Subscribe(p => Comms_PositionReset(p));
        }
Esempio n. 2
0
 public ManualControllViewModel(MovementScaleSettings scale, Communications comms, IObservable <bool> isOpen)
 {
     this.scale = scale;
     this.comms = comms;
 }