private void TurnUpButton_MouseDown(object sender, MouseEventArgs e) { upButtonDown = true; do { lock (sync) { var speed = new PTZSpeed { zoom = null, panTilt = new Vector2D { x = 0, y = GetTiltSpeed() } }; session.ContinuousMove(profileToken, speed, null).RunSynchronously(); session.Stop(profileToken, true, true).RunSynchronously(); Application.DoEvents(); } } while (upButtonDown); }
public void StopZoom() { subscription.Add( CurrentSession.Stop(profileToken, false, true) .ObserveOnCurrentDispatcher() .Subscribe(unit => { }, err => { dbg.Error(err); SetErrorMessage(err.Message); })); }