private void Window_Closed(object sender, EventArgs e) { if (_kinectManager != null) { _kinectManager.Dispose(); } Environment.Exit(0); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Hide(); Remote.Dispose(); if (TurntableScanner != null) { TurntableScanner.Dispose(); } DeviceManager.CloseKinect(); DeviceManager.Dispose(); Settings.RestoreMetadata(); Settings.Save("Settings.ini"); }