Example #1
0
        // Close current file
        private void CloseFile( )
        {
            Camera camera = cameraWindow.Camera;

            if (camera != null)
            {
                // detach camera from camera window
                cameraWindow.Camera = null;

                // signal camera to stop
                camera.SignalToStop( );
                // wait for the camera
                camera.WaitForStop( );

                camera = null;

                if (detector != null)
                {
                    detector.Reset( );
                }
            }

            if (writer != null)
            {
                writer.Dispose( );
                writer = null;
            }
            intervalsToSave = 0;
        }
        public void sleep()
        {
            isAsleep       = true;
            btn_sleep.Text = "Wake";
            displayLine("Sending sleep signal to server");
            writeToServer("sleep");

            startPolling();
            Camera camera = cameraWindow.Camera;

            if (camera != null)
            {
                // detach camera from camera window
                cameraWindow.Camera = null;

                // signal camera to stop
                camera.SignalToStop();
                // wait for the camera
                camera.WaitForStop();

                camera = null;

                if (detector != null)
                {
                    detector.Reset();
                }
            }
        }
Example #3
0
        // Close current file
        private void CloseFile()
        {
            Camera camera = cameraWindow.Camera;

            if (camera != null)
            {
                // detach camera from camera window
                cameraWindow.Camera = null;

                // signal camera to stop
                camera.SignalToStop();
                // wait for the camera
                camera.WaitForStop();

                camera = null;

                if (detector != null)
                {
                    detector.Reset();
                }
            }
        }