Skip to content

Commit 805ad4e

Browse files
committed
Adicionado teste de escolha sem modelo e sem atraso
1 parent aaed256 commit 805ad4e

File tree

10 files changed

+617
-746
lines changed

10 files changed

+617
-746
lines changed

StroopTest/Controllers/StimulusPosition.cs

Lines changed: 79 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -188,37 +188,70 @@ private Point generatePoint(int point)
188188

189189
}
190190

191-
public Point getPositon(Size stimulusSize)
191+
public Point getPositon(Size stimulusSize, char direction = 'h')
192192
{
193193
this.stimulusSize = stimulusSize;
194194
Console.WriteLine(pointCount);
195195
Point position = new Point();
196-
switch (PointsNumber)
196+
if(direction == 'h')
197197
{
198-
case 1:
199-
position = centerPosition(PointsNumber, pointCount);
200-
break;
201-
case 2:
202-
position = twoPointsHorizontalPosition(pointCount);
203-
break;
204-
case 3:
205-
position = threePointsPosition(pointCount);
206-
break;
207-
case 4:
208-
position = fourPointsPosition(pointCount);
209-
break;
210-
case 5:
211-
position = fivePointsPosition(pointCount);
212-
break;
213-
case 6:
214-
position = sixPointsPosition(pointCount);
215-
break;
216-
case 7:
217-
position = sevenPointsPosition(pointCount);
218-
break;
219-
case 8:
220-
position = eightPointsPosition(pointCount);
221-
break;
198+
switch (PointsNumber)
199+
{
200+
case 1:
201+
position = centerPosition(PointsNumber, pointCount);
202+
break;
203+
case 2:
204+
position = twoPointsHorizontalPosition(pointCount);
205+
break;
206+
case 3:
207+
position = threePointsPosition(pointCount);
208+
break;
209+
case 4:
210+
position = fourPointsPosition(pointCount);
211+
break;
212+
case 5:
213+
position = fivePointsPosition(pointCount);
214+
break;
215+
case 6:
216+
position = sixPointsPosition(pointCount);
217+
break;
218+
case 7:
219+
position = sevenPointsPosition(pointCount);
220+
break;
221+
case 8:
222+
position = eightPointsPosition(pointCount);
223+
break;
224+
}
225+
}
226+
else
227+
{
228+
switch (PointsNumber)
229+
{
230+
case 1:
231+
position = centerPosition(PointsNumber, pointCount);
232+
break;
233+
case 2:
234+
position = twoPointsVerticalPosition(pointCount);
235+
break;
236+
case 3:
237+
position = threePointsPosition(pointCount);
238+
break;
239+
case 4:
240+
position = fourPointsPosition(pointCount);
241+
break;
242+
case 5:
243+
position = fivePointsPosition(pointCount);
244+
break;
245+
case 6:
246+
position = sixPointsPosition(pointCount);
247+
break;
248+
case 7:
249+
position = sevenPointsPosition(pointCount);
250+
break;
251+
case 8:
252+
position = eightPointsPosition(pointCount);
253+
break;
254+
}
222255
}
223256
pointCount++;
224257
return position;
@@ -235,7 +268,6 @@ public Point centerPosition(int pointsNumber, int pointPosition)
235268
if (pointPosition < pointsNumber)
236269
{
237270
/*middle center*/
238-
float[] clientMiddle = { (clientSize.Width / 2), (clientSize.Height / 2) };
239271
return generatePoint(D2); // D2
240272
}
241273
else
@@ -251,7 +283,6 @@ public Point centerPosition(int pointsNumber, int pointPosition)
251283
/// </summary>
252284
public Point twoPointsHorizontalPosition(int pointPosition)
253285
{
254-
float[] clientMiddle = { (clientSize.Width / 2), (clientSize.Height / 2) };
255286
switch (pointPosition)
256287
{
257288
case 0: /*middle left */
@@ -263,6 +294,26 @@ public Point twoPointsHorizontalPosition(int pointPosition)
263294
}
264295
}
265296

297+
298+
299+
/// <summary>
300+
/// Generate point in middle left or middle right of user screen
301+
/// <param name="stimulusSize"> size of the stimulus that will be shown to user</param>
302+
/// <param name="pointPosition">poistion of point that will be generated, must be 0 or 1</param>
303+
/// </summary>
304+
public Point twoPointsVerticalPosition(int pointPosition)
305+
{
306+
switch (pointPosition)
307+
{
308+
case 0: /*middle top */
309+
return generatePoint(D1);
310+
case 1: /*middle bottom */
311+
return generatePoint(D3);
312+
default:
313+
throw new InvalidOperationException();
314+
}
315+
}
316+
266317
/// <summary>
267318
/// Generate point in middle left, middle right or middle center of user screen
268319
/// <param name="stimulusSize"> size of the stimulus that will be shown to user</param>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,4 +2897,10 @@ user to the stimulus or if there is no reaction to the stimulus(ms)&lt;/td&gt;
28972897
<data name="defaultMatchingProgram" xml:space="preserve">
28982898
<value>default 2 1500 True 1000 False padrao false #FFFFFF DMTS false false false false 1000 18 False True 1500 1500 #404040 4 0 False False #000000 True True False True</value>
28992899
</data>
2900+
<data name="preference_horizontal" xml:space="preserve">
2901+
<value>Preference(Horizontal)</value>
2902+
</data>
2903+
<data name="preference_vertical" xml:space="preserve">
2904+
<value>Preference(Vertical)</value>
2905+
</data>
29002906
</root>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,4 +2877,10 @@ https://github.com/lab-neuro-comp/Test-Platform</value>
28772877
<data name="defaultMatchingProgram" xml:space="preserve">
28782878
<value>padrao 2 1500 True 1000 False padrao false #FFFFFF DMTS false false false false 1000 18 False True 1500 1500 #404040 4 0 False False #000000 True True False True</value>
28792879
</data>
2880+
<data name="preference_horizontal" xml:space="preserve">
2881+
<value>Preferencia(Horizontal)</value>
2882+
</data>
2883+
<data name="preference_vertical" xml:space="preserve">
2884+
<value>Preferencia(Vertical)</value>
2885+
</data>
28802886
</root>

0 commit comments

Comments
 (0)