コード例 #1
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();
            }
        }