예제 #1
0
        private void Init(bool showLastTest, bool newTestAvailable, string inputData, string eyetrackerDataJson, OutputTestData2 testData)
        {
            labelVersion.Text = "Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            closeApp          = true;

            if (showLastTest)
            {
                inputData = DataBaseWorker.LoadLastPursuitData(out date, out user_id, out eyetrackerDataJson, out testData);
            }

            this.date_loc = testData.date_loc;
            this.user_id  = testData.user_id;
            date          = testData.date;

            buttonNewTest.Enabled = newTestAvailable;

            //Console.WriteLine("selectedPath: " + selectedPath);

            toolStripStatusLabelFileName.Text = string.Format("{0}-us{1}", date_loc, user_id);

            eyetrackerDataL     = ReviewClass.loadEyetrackerDataFromJson(eyetrackerDataJson);
            _testData           = DataConverter.TestData2ToTestData1(testData);
            stimuloPersuitSetup = ReviewClass.loadPersuitDataFromJson(inputData);

            everythingOk = ReviewClass.eyetrackerDataFound(eyetrackerDataL) & ReviewClass.testDataFound(_testData) & ReviewClass.persuitDataFound(stimuloPersuitSetup);

            if (everythingOk)
            {
                plotGazeData2Control();
            }
        }
예제 #2
0
        public Resumen(bool showLastTest, bool newTestAvailable, string fixDataJson, string eyetrackerDataJson, OutputTestData2 testData)
        {
            InitializeComponent();
            labelVersion.Text = "Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            closeApp = true;

            if (showLastTest)
            {
                fixDataJson = DataBaseWorker.LoadLastReadingData(out date, out user_id, out eyetrackerDataJson, out testData);
            }

            this.dateloc = testData.date_loc;
            this.user_id = testData.user_id;
            date         = testData.date;

            buttonNewTest.Enabled = newTestAvailable;

            //Console.WriteLine("selectedPath: " + selectedPath);

            _testData = DataConverter.TestData2ToTestData1(testData);

            if (string.IsNullOrWhiteSpace(fixDataJson))
            {
                fixDataJson = processFixData(eyetrackerDataJson, _testData, testData.date, user_id);//procesa los datos de los ojos y genera un archivo fixData.json
            }
            toolStripStatusLabelFileName.Text = string.Format("{0}-us{1}", dateloc, user_id);
            fixDataFound    = loadFixationDataFromJson(fixDataJson); //carga el archivo fixData.json
            eyetrackerDataL = ReviewClass.loadEyetrackerDataFromJson(eyetrackerDataJson);
            getStimulusFeactures(ReviewClass.eyetrackerDataFound(eyetrackerDataL));
            imageFound = class4Graphic.loadImage2Control(ReviewClass.testDataFound(_testData), _testData, pictureBoxStimulus);

            everythingOk = fixDataFound & ReviewClass.eyetrackerDataFound(eyetrackerDataL) & ReviewClass.testDataFound(_testData) & imageFound;

            if (everythingOk)
            {
                processMetrics();
            }
        }