Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             /*   if (this.screen != null)
              * {
              *     this.screen.Dispose();
              *     this.screen = null;
              * }
              * if (this.cursor != null)
              * {
              *     this.cursor.Dispose();
              *     this.cursor = null;
              * }*/
             if (this.joystick != null)
             {
                 this.joystick.ReleaseJoystick();
                 this.joystick = null;
             }
         }
         this.disposed = true;
     }
 }
Esempio n. 2
0
 public void Go(string port)
 {
     JoystickInterface.BaseJoystick.Window = window;
     joystick = JoystickInterface.BaseJoystick.GetJoystickClass();
     if (joystick != null)
     {
         joystick.ValueChanged += new JoystickInterface.BaseJoystick.ValueChangedHandler(joystick_ValueChanged);
         // time1 = new System.Threading.Timer(new TimerCallback(tick), null, 0, 1);
         foreach (UAVParameter param in values.Values)
         {
             if (param is JoyStickParam)
             {
                 ((JoyStickParam)param).RegisterJoyStick(joystick);
             }
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             /*   if (this.screen != null)
                {
                    this.screen.Dispose();
                    this.screen = null;
                }
                if (this.cursor != null)
                {
                    this.cursor.Dispose();
                    this.cursor = null;
                }*/
             if (this.joystick != null)
             {
                 this.joystick.ReleaseJoystick();
                 this.joystick = null;
             }
         }
         this.disposed = true;
     }
 }
Esempio n. 4
0
        public void Go(string port)
        {
            JoystickInterface.BaseJoystick.Window = window;
            joystick = JoystickInterface.BaseJoystick.GetJoystickClass();
            if (joystick != null){
            joystick.ValueChanged += new JoystickInterface.BaseJoystick.ValueChangedHandler(joystick_ValueChanged);
               // time1 = new System.Threading.Timer(new TimerCallback(tick), null, 0, 1);
            foreach (UAVParameter param in values.Values){
                if (param is JoyStickParam) ((JoyStickParam)param).RegisterJoyStick(joystick);

            }
            }
        }