コード例 #1
0
        /// Functions
        #region Functions

        /// <summary>
        ///
        /// </summary>
        public void saveData2File()
        {
            testData.screen_Height    = Screen.PrimaryScreen.Bounds.Height;
            testData.screen_Width     = Screen.PrimaryScreen.Bounds.Width;
            testData.date             = Program.datosCompartidos.startTimeTest;
            testData.date_loc         = DataConverter.LocalDateFromUTC(Program.datosCompartidos.startTimeTest);
            testData.eyetracker       = Program.datosCompartidos.EyeTrackerInfo;
            testData.user_id          = Program.datosCompartidos.activeUser;
            testData.tester_id        = Program.datosCompartidos.activeTester;
            testData.windows_username = Environment.UserName;
            //testData.pointer_type = "eyetracker"; // settings.pointercontroltypeSelected.ToString();
            //testData.blink_time_min = 0;
            //testData.blink_time_max = 0;
            //testData.dwell_area = settings.DwellArea;
            //testData.dwell_time = settings.DwellTime;
            //testData.dewll_time_latency = settings.DwellLatency;
            testData.calibration_error_left_px  = Program.datosCompartidos.meanCalibrationErrorLeftPx;
            testData.calibration_error_right_px = Program.datosCompartidos.meanCalibrationErrorRightPx;
            testData.filter_type         = settings.filtertypeSelected.ToString();
            testData.typeTestDone        = Program.datosCompartidos.testSelected;
            testData.readingTestTypeDone = Program.datosCompartidos.readingTestTypeSelected;
            testData.image2read          = getReadingTestTypeDone();
            testData.assemblyVersion     = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            DataBaseWorker.SaveTestData(testData, Program.datosCompartidos.activeUser, "");

            string path = DataConverter.OldTypeDirectory(Program.datosCompartidos.startTimeTest, Program.datosCompartidos.activeUser);

            DataValidation.CheckDirectoryPath(path, true, FileAttributes.Hidden);
            File.WriteAllText(path + @"\testData.json", JsonConvert.SerializeObject(testData));
        }
コード例 #2
0
        public void SavePersuitData()
        {
            DataBaseWorker.SavePursuitData(JsonConvert.SerializeObject(this), Program.datosCompartidos.activeUser, LookAndPlayForm.Program.datosCompartidos.startTimeTest);

            string path = DataConverter.OldTypeDirectory(Program.datosCompartidos.startTimeTest, Program.datosCompartidos.activeUser);

            DataValidation.CheckDirectoryPath(path, true, FileAttributes.Hidden);
            File.WriteAllText(path + @"\persuitData.json", JsonConvert.SerializeObject(this));
        }
コード例 #3
0
        private void OnGetCalibrationCompleted(object sender, CalibrationReadyEventArgs e)
        {
            DataBaseWorker.SaveCalibrationData(JsonConvert.SerializeObject(e.CalibrationPointDataL), Program.datosCompartidos.activeUser, LookAndPlayForm.Program.datosCompartidos.startTimeTest);

            string path = DataConverter.OldTypeDirectory(Program.datosCompartidos.startTimeTest, Program.datosCompartidos.activeUser);

            DataValidation.CheckDirectoryPath(path, true, FileAttributes.Hidden);
            File.WriteAllText(path + @"\calibrationData.json", JsonConvert.SerializeObject(e.CalibrationPointDataL));
        }
コード例 #4
0
        void saveData2File()
        {
            FixDataJson = JsonConvert.SerializeObject(fixData);
            DataBaseWorker.SaveFixData(FixDataJson, user_id, date);

            string path = DataConverter.OldTypeDirectory(date, user_id);

            DataValidation.CheckDirectoryPath(path, true, FileAttributes.Hidden);
            File.WriteAllText(path + @"\fixData.json", FixDataJson);

            //FixDataFound = true;
        }
コード例 #5
0
        public void saveData2File()
        {
            generalDataEyeX.targetTraceL = TargetTraceEyeXL;

            DataBaseWorker.SaveEyeTrackerData(JsonConvert.SerializeObject(generalDataEyeX), Program.datosCompartidos.activeUser, LookAndPlayForm.Program.datosCompartidos.startTimeTest);

            string path = DataConverter.OldTypeDirectory(Program.datosCompartidos.startTimeTest, Program.datosCompartidos.activeUser);

            DataValidation.CheckDirectoryPath(path, true, FileAttributes.Hidden);
            File.WriteAllText(path + @"\eyetrackerData.json", JsonConvert.SerializeObject(generalDataEyeX));

            ClearList();
        }
コード例 #6
0
        /// Events
        #region Events

        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void worker_DoWork(object sender, DoWorkEventArgs args)
        {
            DataBaseWorker.CreateDataBase(CData.DataBasePath);
            DataBaseWorker.ConvertExistingDataFrom(CData.DataFolder);
            DataValidation.CheckDirectoryPath(CData.TempDataFolder, true, System.IO.FileAttributes.Hidden);
        }