Exemple #1
0
        private void Window_Closing(object sender, CancelEventArgs e)
        {
            // Shutdown Tracker
            if (tracker != null)
            {
                tracker.Shutdown();
                tracker.Dispose();
                tracker = null;
            }

            // Destroy Transformation
            if (transformation != null)
            {
                transformation.Dispose();
                transformation = null;
            }

            // Stop and Close Camera
            if (device != null)
            {
                device.StopCameras();
                device.Dispose();
                device = null;
            }
        }
Exemple #2
0
        private void Window_Unloaded(object sender, RoutedEventArgs e)
        {
            // Shutdown Tracker
            if (tracker != null)
            {
                tracker.Shutdown();
                tracker.Dispose();
                tracker = null;
            }

            // Stop and Close Camera
            if (device != null)
            {
                device.StopCameras();
                device.Dispose();
                device = null;
            }
        }