/// <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; } }
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); } } } }
/// <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; } }
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); } } }