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);
        }
Exemple #2
0
 public void MoveContinuous(Vector2D panTilt, Vector1D zoom)
 {
     CurrentSession
     .ContinuousMove(
         profileToken,
         new PTZSpeed()
     {
         panTilt = panTilt, zoom = zoom
     },
         null
         )
     .ObserveOnCurrentDispatcher()
     .Subscribe(
         unit => { },
         err => {
         //dbg.Error(err);
         SetErrorMessage(err.Message);
     }
         );
 }