Ejemplo n.º 1
0
 /// <summary>
 /// 卸载Joystick
 /// </summary>
 private void JoystickDispose()
 {
     _joystick_P.Move -= new EventHandler <JoystickEventArgs>(_joystick_P_Click);
     _joystick_P.UnRegister(API.JOYSTICKID1);
     _joystick_V.ReleaseCapture();
     _joystick_V.Dispose();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 关闭服务
        /// </summary>
        public void Close()
        {
            _joystick_P.Click -= new EventHandler <JoystickEventArgs>(_joystick_P_Click);
            _joystick_P.UnRegister(API.JOYSTICKID1);
            _joystick_V.ReleaseCapture();
            _joystick_V.Dispose();

            _worker.CancelAsync();
            _worker = null;
        }