Skip to content

Commit 67861ab

Browse files
Merge pull request #170 from lab-neuro-comp/ResultLists
159/Result lists
2 parents 2a3dc09 + b19bdbc commit 67861ab

File tree

11 files changed

+132
-31
lines changed

11 files changed

+132
-31
lines changed

StroopTest/Models/General/StrList.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,10 @@ static internal string[] readListFile(string filepath)
275275

276276
public static string outPutItemName(string path)
277277
{
278-
string lastFolderName = Path.GetFileName(Path.GetDirectoryName(path));
279278
string fileName = Path.GetFileName(path);
280-
string name = lastFolderName + "/" + fileName;
281-
return name;
279+
return fileName;
282280
}
283281

282+
284283
}
285284
}

StroopTest/Models/Tests/Matching/MatchingTest.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ public void setProgramInUse(string path, string prgName)
133133
}
134134
}
135135

136-
public void writeLineOutput(long attemptIntervalTime, long stimuluIntervalTime, long modelReactTime, long stimuluReactTime, int currentExposition, long modelExpositionAccumulative, long stimuluExpositionAccumulative, string modelFirstposition, string modelSecondPosition, string testType, string match, string model, string[] stimulus, string stimuluPosition
137-
, string stimuluType, string modelColor, string clickedStimuluColor)
136+
public void writeLineOutput(long attemptIntervalTime, long stimuluIntervalTime, long modelReactTime, long stimuluReactTime, int currentExposition,
137+
long modelExpositionAccumulative, long stimuluExpositionAccumulative, string modelFirstposition, string modelSecondPosition, string testType, string match,
138+
string model, string currentList, string[] stimulus, string stimuluPosition, string stimuluType, string modelColor, string clickedStimuluColor)
138139
{
139140
string text = ProgramInUse.ProgramName + "\t" +
140141
participantName + "\t" +
@@ -150,6 +151,7 @@ public void writeLineOutput(long attemptIntervalTime, long stimuluIntervalTime,
150151
currentExposition + "\t" +
151152
testType + "\t" +
152153
stimuluType + "\t" +
154+
currentList + "\t" +
153155
modelFirstposition + "\t" +
154156
model + "\t" +
155157
modelColor + "\t" +

StroopTest/Models/Tests/Reaction/ReactionTest.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,23 @@ private string expositionTypeOutput()
168168
}
169169
}
170170

171-
public void writeLineOutput(long intervalTime, long intervalShouldBe, long reactTime, int currentExposition, long expositionAccumulative, string[] currentStimuli, string position, bool beeped, string currentColor)
171+
public void writeLineOutput(long intervalTime, long intervalShouldBe, long reactTime, int currentExposition, long expositionAccumulative,
172+
string[] currentLists, string[] currentStimuli, string position, bool beeped, string currentColor)
172173
{
173174
/* This variable keeps data from an exposition to only one stimulus, being them:
174175
* programa\tparticipante\tdata\thorarioInicial\thorarioExposicao\ttr(ms)\tintervalo(ms)\tintervaloestimado(ms)\texposicaoTempo(ms)\texposicao(ms)\tsequencia\tpos\trespostaUsuario\ttipoEstimulo\tEstimulo\tCordoEstimulo\tBeep
175176
* program\tparticipant\tdate\tInitialTime\texpositionTime\treactionTime(ms)\tInterval(ms)\testimatedInterval(ms)\texpositionDuration(ms)\texposition(ms)\tsenquency\tpos\tuserResponse\tstimulusType\tstimulus\tstimulusColor\tBeep
176177
* program name participant name date hour exposition hour hit time(ms) interval(ms) interval should be(ms)
177-
* exposition accumulative timeexposition time(ms) number of sequency position on screen user response type of stimulus stimulus1 stimulus2
178+
* exposition accumulative timeexposition time(ms) number of sequency position on screen user response type of stimulus stimulus1List stimulus1
179+
* stimulus2List stimulus2
178180
* stimulus color */
179181
var text = ProgramInUse.ProgramName + "\t" + participantName + "\t" + initialTime.Day + "/" +
180182
initialTime.Month + "/" + initialTime.Year + "\t" + initialTime.Hour + ":" + initialTime.Minute +
181183
":" + initialTime.Second + ":" + initialTime.Millisecond.ToString() + "\t" + ExpositionTime.Hour + ":" + ExpositionTime.Minute +
182184
":" + ExpositionTime.Second + ":" + ExpositionTime.Millisecond.ToString() + "\t" + reactTime.ToString() +
183185
"\t" + intervalTime.ToString() + "\t" + intervalShouldBe.ToString() + "\t" + expositionAccumulative + "\t" +
184186
ProgramInUse.ExpositionTime + "\t" + currentExposition + "\t" + position + "\t" + CurrentResponse + "\t"+ expositionTypeOutput() + "\t" +
185-
currentStimuli[0] + "\t" + currentStimuli[1] + "\t" + currentColor + "\t" + beeped.ToString();
187+
currentLists[0] + "\t" + currentStimuli[0] + "\t"+ currentLists[1] + "\t" + currentStimuli[1] + "\t" + currentColor + "\t" + beeped.ToString();
186188
Output.Add(text);
187189

188190
}

StroopTest/Resources/Localizations/LocalizedResources.en-US.resx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ To upgrade, the new version installation file must be run in the same folder as
10681068
<value>wasn't written\n\n</value>
10691069
</data>
10701070
<data name="reactionTestHeader" xml:space="preserve">
1071-
<value>program\tparticipant\tdate\tInitial Time\tExposition time\tReactionTime(ms)\tInterval(ms)\tEstimated Interval(ms)\tExposition Duration(ms)\tExposition(ms)\tsenquency\tpos\tUser response\tStimulus1\tStimulus2 Type\tstimulus\tStimulus Color\tBeep</value>
1071+
<value>program\tparticipant\tdate\tInitial Time\tExposition time\tReactionTime(ms)\tInterval(ms)\tEstimated Interval(ms)\tExposition Duration(ms)\tExposition(ms)\tsenquency\tpos\tUser response\tList1\tStimulus1\tList2\tStimulus2 Type\tstimulus\tStimulus Color\tBeep</value>
10721072
</data>
10731073
<data name="responseTypeError" xml:space="preserve">
10741074
<value>Selected response type is invalid. Valid options are: spacebar or key arrows.</value>
@@ -2375,7 +2375,7 @@ user to the stimulus or if there is no reaction to the stimulus(ms)&lt;/td&gt;
23752375
<value>choose a image list</value>
23762376
</data>
23772377
<data name="matchingTestHeader" xml:space="preserve">
2378-
<value>Program\tParticipant\tDate\tInitial Time\tExposition Time\tModel Reaction Time(ms)\tStimulu Reaction Time(ms)\tInterval between attempts(ms)\tInterval(ms)\tModel Exposition(ms)\tStimulu Exposition(ms)\tSenquency\tTest Type\tStimulus Type\tModel first position\tModel\tModel color\t2nd Stimulu\t3rd Stimulu\t4th Stimulu\t5th Stumulu\t6th Stimulu\t7th Stimulu\t8th Stimulu\tModel second position\tClicked Stimulu\tClicked Stimulu Color\tClicked Stimulu Position\tMatch</value>
2378+
<value>Program\tParticipant\tDate\tInitial Time\tExposition Time\tModel Reaction Time(ms)\tStimulu Reaction Time(ms)\tInterval between attempts(ms)\tInterval(ms)\tModel Exposition(ms)\tStimulu Exposition(ms)\tSenquency\tTest Type\tStimulus Type\tList\tModel first position\tModel\tModel color\t2nd Stimulu\t3rd Stimulu\t4th Stimulu\t5th Stumulu\t6th Stimulu\t7th Stimulu\t8th Stimulu\tModel second position\tClicked Stimulu\tClicked Stimulu Color\tClicked Stimulu Position\tMatch</value>
23792379
</data>
23802380
<data name="CannotBeEmpty" xml:space="preserve">
23812381
<value>This field should be filled</value>

StroopTest/Resources/Localizations/LocalizedResources.pt-BR.resx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ https://github.com/lab-neuro-comp/Test-Platform</value>
12981298
<value>não foi escrito\n\n</value>
12991299
</data>
13001300
<data name="reactionTestHeader" xml:space="preserve">
1301-
<value>Programa\tParticipante\tData\tHorario inicial\tHorario exposicao\tTR(ms)\tIntervalo(ms)\tIntervalo estimado(ms)\tExposicao tempo(ms)\tExposicao(ms)\tSequencia\tPos\tResposta usuario\tTipo estimulo\tEstimulo1\tEstimulo2\tCor do estimulo\tBeep</value>
1301+
<value>Programa\tParticipante\tData\tHorário inicial\tHorário exposição\tTR(ms)\tIntervalo(ms)\tIntervalo estimado(ms)\tExposição tempo(ms)\tExposicao(ms)\tSequência\tPosição\tResposta usuário\tTipo estímulo\tLista1\tEstímulo1\tLista2\tEstímulo2\tCor do estímulo\tBeep</value>
13021302
</data>
13031303
<data name="responseTypeError" xml:space="preserve">
13041304
<value>Tipo de resposta selecionado inválido. As opções válidas são: barra de espaço ou setas.</value>
@@ -2356,7 +2356,7 @@ https://github.com/lab-neuro-comp/Test-Platform</value>
23562356
<value>Selecione uma lista de imagens</value>
23572357
</data>
23582358
<data name="matchingTestHeader" xml:space="preserve">
2359-
<value>Programa\tParticipante\tData\tHorario Inicial\tTempo de Exposição\tReação do modelo(ms)\tReação do estimulo(ms)\tIntervalo das tentativas(ms)\tIntervalo(ms)\tExposição do modelo(ms)\tExposição do estímulo(ms)\tSenquencia\tTipo de Teste\tTipo de estimulo\tPrimeira posição do modelo\tModelo\tCor do modelo\tEstimulo 2\tEstimulo 3\tEstimulo 4\tEstimulo 5\tEstimulo 6\tEstimulo 7\tEstimulo 8\tSegunda posição do modelo\tNome do estimulo clicado\tCor do estimulo clicado\tPosição do estimulo clicado\tIgual</value>
2359+
<value>Programa\tParticipante\tData\tHorario Inicial\tTempo de Exposição\tReação do modelo(ms)\tReação do estimulo(ms)\tIntervalo das tentativas(ms)\tIntervalo(ms)\tExposição do modelo(ms)\tExposição do estímulo(ms)\tSenquencia\tTipo de Teste\tTipo de estimulo\tLista\tPrimeira posição do modelo\tModelo\tCor do modelo\tEstimulo 2\tEstimulo 3\tEstimulo 4\tEstimulo 5\tEstimulo 6\tEstimulo 7\tEstimulo 8\tSegunda posição do modelo\tNome do estimulo clicado\tCor do estimulo clicado\tPosição do estimulo clicado\tIgual</value>
23602360
</data>
23612361
<data name="CannotBeEmpty" xml:space="preserve">
23622362
<value>Esse campo deve ser preenchido</value>

StroopTest/Views/MatchingPages/FormMatchConfig.resx

+12-12
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@
953953
<data name="feedbackAudioResponse.TabIndex" type="System.Int32, mscorlib">
954954
<value>25</value>
955955
</data>
956-
<data name="feedbackAudioResponse.Text" xml:space="preserve">
956+
<data name="feedbackAudioResponse.Text_Duplicate[1]" xml:space="preserve">
957957
<value>Acerto / Erro</value>
958958
</data>
959959
<data name="&gt;&gt;feedbackAudioResponse.Name" xml:space="preserve">
@@ -980,7 +980,7 @@
980980
<data name="expositonAudioResponse.TabIndex" type="System.Int32, mscorlib">
981981
<value>24</value>
982982
</data>
983-
<data name="expositonAudioResponse.Text" xml:space="preserve">
983+
<data name="expositonAudioResponse.Text_Duplicate[1]" xml:space="preserve">
984984
<value>Exposição</value>
985985
</data>
986986
<data name="&gt;&gt;expositonAudioResponse.Name" xml:space="preserve">
@@ -1409,7 +1409,7 @@
14091409
<data name="DMTSBackground.TabIndex" type="System.Int32, mscorlib">
14101410
<value>21</value>
14111411
</data>
1412-
<data name="DMTSBackground.Text" xml:space="preserve">
1412+
<data name="DMTSBackground.Text_Duplicate[1]" xml:space="preserve">
14131413
<value>escolher</value>
14141414
</data>
14151415
<data name="&gt;&gt;DMTSBackground.Name" xml:space="preserve">
@@ -1439,7 +1439,7 @@
14391439
<data name="DNMTSBackgroundLabel.TabIndex" type="System.Int32, mscorlib">
14401440
<value>1</value>
14411441
</data>
1442-
<data name="DNMTSBackgroundLabel.Text" xml:space="preserve">
1442+
<data name="DNMTSBackgroundLabel.Text_Duplicate[1]" xml:space="preserve">
14431443
<value>Fundo do DNMTS:</value>
14441444
</data>
14451445
<data name="&gt;&gt;DNMTSBackgroundLabel.Name" xml:space="preserve">
@@ -1472,7 +1472,7 @@
14721472
<data name="DMTSBackgroundLabel.TabIndex" type="System.Int32, mscorlib">
14731473
<value>0</value>
14741474
</data>
1475-
<data name="DMTSBackgroundLabel.Text" xml:space="preserve">
1475+
<data name="DMTSBackgroundLabel.Text_Duplicate[1]" xml:space="preserve">
14761476
<value>Fundo do DMTS:</value>
14771477
</data>
14781478
<data name="&gt;&gt;DMTSBackgroundLabel.Name" xml:space="preserve">
@@ -1751,7 +1751,7 @@
17511751
<data name="timeGroupBox.TabIndex" type="System.Int32, mscorlib">
17521752
<value>86</value>
17531753
</data>
1754-
<data name="timeGroupBox.Text" xml:space="preserve">
1754+
<data name="timeGroupBox.Text_Duplicate[1]" xml:space="preserve">
17551755
<value>Tempo</value>
17561756
</data>
17571757
<data name="&gt;&gt;timeGroupBox.Name" xml:space="preserve">
@@ -1775,7 +1775,7 @@
17751775
<data name="modelExpositionLabel.TabIndex" type="System.Int32, mscorlib">
17761776
<value>0</value>
17771777
</data>
1778-
<data name="modelExpositionLabel.Text" xml:space="preserve">
1778+
<data name="modelExpositionLabel.Text_Duplicate[1]" xml:space="preserve">
17791779
<value>Exposição do modelo (ms):</value>
17801780
</data>
17811781
<data name="&gt;&gt;modelExpositionLabel.Name" xml:space="preserve">
@@ -2027,7 +2027,7 @@
20272027
<data name="listGroupBox.TabIndex" type="System.Int32, mscorlib">
20282028
<value>13</value>
20292029
</data>
2030-
<data name="listGroupBox.Text" xml:space="preserve">
2030+
<data name="listGroupBox.Text_Duplicate[1]" xml:space="preserve">
20312031
<value>Listas</value>
20322032
</data>
20332033
<data name="&gt;&gt;listGroupBox.Name" xml:space="preserve">
@@ -2069,7 +2069,7 @@
20692069
<data name="wordLabel.TabIndex" type="System.Int32, mscorlib">
20702070
<value>0</value>
20712071
</data>
2072-
<data name="wordLabel.Text" xml:space="preserve">
2072+
<data name="wordLabel.Text_Duplicate[1]" xml:space="preserve">
20732073
<value>Palavras:</value>
20742074
</data>
20752075
<data name="&gt;&gt;wordLabel.Name" xml:space="preserve">
@@ -2495,7 +2495,7 @@
24952495
<data name="expositionGroupBox.TabIndex" type="System.Int32, mscorlib">
24962496
<value>85</value>
24972497
</data>
2498-
<data name="expositionGroupBox.Text" xml:space="preserve">
2498+
<data name="expositionGroupBox.Text_Duplicate[1]" xml:space="preserve">
24992499
<value>Exposição</value>
25002500
</data>
25012501
<data name="&gt;&gt;expositionGroupBox.Name" xml:space="preserve">
@@ -2543,7 +2543,7 @@
25432543
<data name="programNameLabel.TabIndex" type="System.Int32, mscorlib">
25442544
<value>83</value>
25452545
</data>
2546-
<data name="programNameLabel.Text" xml:space="preserve">
2546+
<data name="programNameLabel.Text_Duplicate[1]" xml:space="preserve">
25472547
<value>Nome do programa:</value>
25482548
</data>
25492549
<data name="&gt;&gt;programNameLabel.Name" xml:space="preserve">
@@ -2636,7 +2636,7 @@
26362636
<data name="instructionsLabel.TabIndex" type="System.Int32, mscorlib">
26372637
<value>71</value>
26382638
</data>
2639-
<data name="instructionsLabel.Text" xml:space="preserve">
2639+
<data name="instructionsLabel.Text_Duplicate[1]" xml:space="preserve">
26402640
<value>Instruções:</value>
26412641
</data>
26422642
<data name="&gt;&gt;instructionsLabel.Name" xml:space="preserve">

StroopTest/Views/MatchingPages/MatchingExposition.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -921,15 +921,15 @@ private void expositionBW_RunWorkerCompleted(object sender, RunWorkerCompletedEv
921921
stimulus.Remove(this.matchingGroups.ElementAt(groupCounter - 1).getModelName());
922922
for (int count = 0; count < stimulus.Count; count++)
923923
{
924-
stimulus[count] = currentList + "/" + Path.GetFileNameWithoutExtension(stimulus[count]);
924+
stimulus[count] = Path.GetFileNameWithoutExtension(stimulus[count]);
925925
}
926926
while (stimulus.Count <= 7)
927927
{
928928
stimulus.Add("-");
929929
}
930930
if ((e.Cancelled == true) && !intervalCancelled) /* user clicked after stimulus is shown*/
931931
{
932-
stimulus[7] = currentList + "/" + Path.GetFileNameWithoutExtension(this.matchingGroups.ElementAt(groupCounter - 1).getControlName(objectClicked, stimuluType));
932+
stimulus[7] = Path.GetFileNameWithoutExtension(this.matchingGroups.ElementAt(groupCounter - 1).getControlName(objectClicked, stimuluType));
933933
executingTest.writeLineOutput(
934934
attemptIntervalTime,
935935
intervalElapsedTime,
@@ -942,7 +942,8 @@ private void expositionBW_RunWorkerCompleted(object sender, RunWorkerCompletedEv
942942
modelSecondPosition,
943943
currentExpositionType,
944944
(this.matchingGroups.ElementAt(groupCounter - 1).getControlName(objectClicked, stimuluType) == this.matchingGroups.ElementAt(groupCounter - 1).getModelName()).ToString(),
945-
currentList + "/" + Path.GetFileNameWithoutExtension(this.matchingGroups.ElementAt(groupCounter - 1).getModelName()),
945+
Path.GetFileNameWithoutExtension(this.matchingGroups.ElementAt(groupCounter - 1).getModelName()),
946+
currentList,
946947
stimulus.ToArray(),
947948
stimuluPosition.getStimulusPositionMap(objectClicked.Location, size),
948949
getStimuluType(),
@@ -982,6 +983,7 @@ private void expositionBW_RunWorkerCompleted(object sender, RunWorkerCompletedEv
982983
currentExpositionType,
983984
"-",
984985
this.matchingGroups.ElementAt(groupCounter - 1).getModelName(),
986+
currentList,
985987
stimulus.ToArray(),
986988
"-",
987989
getStimuluType(),

StroopTest/Views/ReactionPages/FormReactExposition.cs

+11-4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public partial class FormReactExposition : Form
5656

5757
private bool exposing = false;
5858
private string[] currentStimuli = {"-", "-" };
59+
private string[] currentLists = { "-", "-" };
5960
private int currentPosition;
6061
private string currentPositionOutput;
6162
private bool currentBeep = false;
@@ -455,6 +456,8 @@ private void drawWord()
455456
wordLabel = ExpositionController.InitializeWordLabel(executingTest.ProgramInUse.FontSize, wordsList[wordCounter], colorsList[colorCounter], screenPosition);
456457

457458
currentStimuli[0] = wordsList[wordCounter];
459+
currentLists[0] = executingTest.ProgramInUse.getWordListFile().ListName;
460+
458461
currentColor = colorsList[colorCounter];
459462
wordCounter++;
460463

@@ -477,6 +480,8 @@ private void drawImage()
477480
imgPictureBox.Location = screenPosition;
478481

479482
currentStimuli[0] = StrList.outPutItemName(imagesList[imageCounter]);
483+
currentLists[0] = executingTest.ProgramInUse.getImageListFile().ListName;
484+
480485
imageCounter++;
481486
if(imageCounter == imagesList.Length)
482487
{
@@ -489,6 +494,8 @@ private void playAudio()
489494
{
490495
string currentAudio = audioList[audioCounter];
491496
currentStimuli[1] = StrList.outPutItemName(currentAudio);
497+
currentLists[1] = executingTest.ProgramInUse.getAudioListFile().ListName;
498+
492499
Player.SoundLocation = currentAudio;
493500
audioCounter++;
494501
if (audioCounter == audioList.Length)
@@ -685,21 +692,21 @@ private void expositionBW_RunWorkerCompleted(object sender, RunWorkerCompletedEv
685692
{
686693
/* user clicked after stimulus is shown*/
687694
executingTest.writeLineOutput(intervalElapsedTime, intervalShouldBe, hitStopWatch.ElapsedMilliseconds,
688-
currentExposition + 1, expositionAccumulative, currentStimuli, currentPositionOutput, currentBeep, currentColor);
695+
currentExposition + 1, expositionAccumulative, currentLists,currentStimuli, currentPositionOutput, currentBeep, currentColor);
689696
}
690697

691698
else if ((e.Cancelled == true) && intervalCancelled)
692699
{
693700
/* user clicked before stimulus is shown*/
694701
executingTest.writeLineOutput(intervalElapsedTime, intervalShouldBe, intervalElapsedTime - intervalShouldBe,
695-
currentExposition + 1, expositionAccumulative, currentStimuli, currentPositionOutput, currentBeep, currentColor);
702+
currentExposition + 1, expositionAccumulative, currentLists, currentStimuli, currentPositionOutput, currentBeep, currentColor);
696703
}
697704
else
698705
{
699706
/* user missed stimulus */
700707
executingTest.CurrentResponse = "NA";
701-
executingTest.writeLineOutput(intervalElapsedTime, intervalShouldBe, 0, currentExposition + 1, expositionAccumulative, currentStimuli, currentPositionOutput,
702-
currentBeep, currentColor);
708+
executingTest.writeLineOutput(intervalElapsedTime, intervalShouldBe, 0, currentExposition + 1, expositionAccumulative, currentLists, currentStimuli,
709+
currentPositionOutput, currentBeep, currentColor);
703710
hitStopWatch.Stop();
704711
}
705712
expositionBW.Dispose();

0 commit comments

Comments
 (0)