Exemplo n.º 1
0
        public void saveFiles(int recordingSpeed = 0)
        {
            string eyePosFilename   = filenameWithoutExtention + "_eyePos.csv";
            string paramFilename    = filenameWithoutExtention + "_param.txt";
            string screenshotFolder = filenameWithoutExtention + "_screenshots";
            string gazeFilename     = filenameWithoutExtention + ".csv";

            //Write the parameters
            File.WriteAllText(paramFilename, "Screen Bounds in pixels: " + eyeXHost.ScreenBounds + "\nDisplay Size in millimeters " + eyeXHost.DisplaySize + "\n");
            File.AppendAllText(paramFilename, "Eye tracking device status: " + eyeXHost.EyeTrackingDeviceStatus + "\n");
            File.AppendAllText(paramFilename, "User presence: " + eyeXHost.UserPresence + "\n");
            File.AppendAllText(paramFilename, "User profile name: " + eyeXHost.UserProfileName + "\n");
            File.AppendAllText(paramFilename, "Gaze Point Data Mode: " + gpdm.ToString() + "\n");
            if (recordingSpeed != 0)
            {
                File.AppendAllText(paramFilename, "Recording speed: " + recordingSpeed);
            }
            else
            {
                File.AppendAllText(paramFilename, "Recording speed: UNDEFINED");
            }

            //Write the headers
            File.WriteAllText(gazeFilename, "WindowsTime;Timestamp;GazeX;GazeY\n");
            File.WriteAllText(eyePosFilename, "WindowsTime;Timestamp;LeftEye;X;Y;Z;RightEye;X;Y;Z\n");
            //Write the files
            File.AppendAllLines(gazeFilename, linesGaze);
            File.AppendAllLines(eyePosFilename, linesEyePosition);

            //make a screenshot and save it
            //screenshot(screenshotFolder + "/01.png");
        }