Пример #1
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     DialogResult = true;
     if (_gamepad == null)
     {
         return;
     }
     _gamepad.CancelPollAsync();
     _gamepad.Dispose();
 }
Пример #2
0
 private void wndFullScreen_Closing(object sender, CancelEventArgs e)
 {
     DialogResult = true;
     if (gamePad != null)
     {
         gamePad.CancelPollAsync();
         gamePad.Dispose();
     }
     _timer.Stop();
     _timer = null;
     GC.Collect();
 }