/// <summary> /// Override method to handle the application closing. /// Unregisters device change notifications. /// </summary> /// <param name="e">The event.</param> protected override void OnFormClosing(FormClosingEventArgs e) { // Call the base method base.OnFormClosing(e); // Unregister for USB notifications UsbNotification.UnregisterUsbDeviceNotification(); }
/// <summary> /// Override method to handle the application closing. /// Unregisters device change notifications. /// </summary> /// <param name="e">The event.</param> protected override void OnFormClosing(FormClosingEventArgs e) { // Call the base method base.OnFormClosing(e); // Unregister for USB notifications UsbNotification.UnregisterUsbDeviceNotification(); // Save the window position Properties.Settings.Default.WindowLocation = this.Location; Properties.Settings.Default.Save(); }