Commit b3f417fe5880283ff32d08dccec6f57c30f804c7
1 parent
a1b6309a
Exists in
master
first prototype GUI for creating and editing free-mtrix experiments
Showing
5 changed files
with
1275 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,84 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<CONFIG> | |
3 | + <ProjectOptions> | |
4 | + <Version Value="9"/> | |
5 | + <General> | |
6 | + <SessionStorage Value="InProjectDir"/> | |
7 | + <MainUnit Value="0"/> | |
8 | + <Title Value="experiment_designer"/> | |
9 | + <ResourceType Value="res"/> | |
10 | + <UseXPManifest Value="True"/> | |
11 | + <Icon Value="0"/> | |
12 | + </General> | |
13 | + <i18n> | |
14 | + <EnableI18N LFM="False"/> | |
15 | + </i18n> | |
16 | + <VersionInfo> | |
17 | + <StringTable ProductVersion=""/> | |
18 | + </VersionInfo> | |
19 | + <BuildModes Count="1"> | |
20 | + <Item1 Name="Default" Default="True"/> | |
21 | + </BuildModes> | |
22 | + <PublishOptions> | |
23 | + <Version Value="2"/> | |
24 | + </PublishOptions> | |
25 | + <RunParams> | |
26 | + <local> | |
27 | + <FormatVersion Value="1"/> | |
28 | + </local> | |
29 | + </RunParams> | |
30 | + <RequiredPackages Count="1"> | |
31 | + <Item1> | |
32 | + <PackageName Value="LCL"/> | |
33 | + </Item1> | |
34 | + </RequiredPackages> | |
35 | + <Units Count="3"> | |
36 | + <Unit0> | |
37 | + <Filename Value="experiment_designer.lpr"/> | |
38 | + <IsPartOfProject Value="True"/> | |
39 | + </Unit0> | |
40 | + <Unit1> | |
41 | + <Filename Value="form_main.pas"/> | |
42 | + <IsPartOfProject Value="True"/> | |
43 | + <ComponentName Value="FormDesigner"/> | |
44 | + <HasResources Value="True"/> | |
45 | + <ResourceBaseClass Value="Form"/> | |
46 | + </Unit1> | |
47 | + <Unit2> | |
48 | + <Filename Value="../units/game_actors_helpers.pas"/> | |
49 | + <IsPartOfProject Value="True"/> | |
50 | + </Unit2> | |
51 | + </Units> | |
52 | + </ProjectOptions> | |
53 | + <CompilerOptions> | |
54 | + <Version Value="11"/> | |
55 | + <Target> | |
56 | + <Filename Value="experiment_designer"/> | |
57 | + </Target> | |
58 | + <SearchPaths> | |
59 | + <IncludeFiles Value="$(ProjOutDir)"/> | |
60 | + <OtherUnitFiles Value="../units"/> | |
61 | + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> | |
62 | + </SearchPaths> | |
63 | + <Linking> | |
64 | + <Options> | |
65 | + <Win32> | |
66 | + <GraphicApplication Value="True"/> | |
67 | + </Win32> | |
68 | + </Options> | |
69 | + </Linking> | |
70 | + </CompilerOptions> | |
71 | + <Debugging> | |
72 | + <Exceptions Count="3"> | |
73 | + <Item1> | |
74 | + <Name Value="EAbort"/> | |
75 | + </Item1> | |
76 | + <Item2> | |
77 | + <Name Value="ECodetoolError"/> | |
78 | + </Item2> | |
79 | + <Item3> | |
80 | + <Name Value="EFOpenError"/> | |
81 | + </Item3> | |
82 | + </Exceptions> | |
83 | + </Debugging> | |
84 | +</CONFIG> | ... | ... |
... | ... | @@ -0,0 +1,21 @@ |
1 | +program experiment_designer; | |
2 | + | |
3 | +{$mode objfpc}{$H+} | |
4 | + | |
5 | +uses | |
6 | + {$IFDEF UNIX}{$IFDEF UseCThreads} | |
7 | + cthreads, | |
8 | + {$ENDIF}{$ENDIF} | |
9 | + Interfaces, // this includes the LCL widgetset | |
10 | + Forms, form_main | |
11 | + { you can add units after this }; | |
12 | + | |
13 | +{$R *.res} | |
14 | + | |
15 | +begin | |
16 | + RequireDerivedFormResource:=True; | |
17 | + Application.Initialize; | |
18 | + Application.CreateForm(TFormDesigner, FormDesigner); | |
19 | + Application.Run; | |
20 | +end. | |
21 | + | ... | ... |
... | ... | @@ -0,0 +1,828 @@ |
1 | +object FormDesigner: TFormDesigner | |
2 | + Left = 114 | |
3 | + Height = 635 | |
4 | + Top = 53 | |
5 | + Width = 656 | |
6 | + HorzScrollBar.Page = 521 | |
7 | + VertScrollBar.Page = 616 | |
8 | + AutoScroll = True | |
9 | + Caption = 'Planejar Experimento' | |
10 | + ClientHeight = 616 | |
11 | + ClientWidth = 646 | |
12 | + Menu = MainMenu1 | |
13 | + OnCreate = FormCreate | |
14 | + OnDestroy = FormDestroy | |
15 | + SessionProperties = 'Caption;ComboCurrentCondition.ItemIndex;ComboCurrentCondition.Items;ComboCurrentContingency.ItemIndex;ComboCurrentContingency.Items;Height;Left;PageControl.TabIndex;Top;Width;WindowState' | |
16 | + LCLVersion = '1.6.2.0' | |
17 | + object PageControl: TPageControl | |
18 | + Left = 0 | |
19 | + Height = 711 | |
20 | + Top = 0 | |
21 | + Width = 646 | |
22 | + ActivePage = TabSheetConditions | |
23 | + Align = alClient | |
24 | + TabIndex = 1 | |
25 | + TabOrder = 0 | |
26 | + object TabSheetExperiment: TTabSheet | |
27 | + Caption = 'Experimento' | |
28 | + ChildSizing.TopBottomSpacing = 10 | |
29 | + ChildSizing.VerticalSpacing = 5 | |
30 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
31 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
32 | + ChildSizing.ControlsPerLine = 1 | |
33 | + ClientHeight = 678 | |
34 | + ClientWidth = 640 | |
35 | + object LabelResearcherName: TLabel | |
36 | + Left = 0 | |
37 | + Height = 15 | |
38 | + Top = 10 | |
39 | + Width = 619 | |
40 | + Caption = 'Nome do Pesquisador' | |
41 | + ParentColor = False | |
42 | + end | |
43 | + object EditResearcherName: TEdit | |
44 | + Left = 0 | |
45 | + Height = 25 | |
46 | + Hint = 'Uma pasta será criada com o seu nome. Os seus experimentos serão salvos dentro dela.' | |
47 | + Top = 30 | |
48 | + Width = 619 | |
49 | + TabOrder = 0 | |
50 | + end | |
51 | + object LabelExperimentName: TLabel | |
52 | + Left = 0 | |
53 | + Height = 15 | |
54 | + Top = 60 | |
55 | + Width = 619 | |
56 | + Caption = 'Nome do Experimento' | |
57 | + ParentColor = False | |
58 | + end | |
59 | + object EditExperimentName: TEdit | |
60 | + Left = 0 | |
61 | + Height = 25 | |
62 | + Hint = 'Uma pasta será criada com o nome do experimento. Os dados desse experimento serão salvos dentro dela.' | |
63 | + Top = 80 | |
64 | + Width = 619 | |
65 | + TabOrder = 1 | |
66 | + end | |
67 | + object GBExperimentAim: TGroupBox | |
68 | + Left = 0 | |
69 | + Height = 159 | |
70 | + Top = 110 | |
71 | + Width = 619 | |
72 | + Caption = 'Objetivo do Experimento' | |
73 | + ClientHeight = 142 | |
74 | + ClientWidth = 615 | |
75 | + TabOrder = 2 | |
76 | + object MemoExperimentAim: TMemo | |
77 | + Left = 0 | |
78 | + Height = 142 | |
79 | + Top = 0 | |
80 | + Width = 615 | |
81 | + Align = alCustom | |
82 | + Anchors = [akTop, akLeft, akRight] | |
83 | + TabOrder = 0 | |
84 | + end | |
85 | + end | |
86 | + object CGGlobal: TCheckGroup | |
87 | + Left = 0 | |
88 | + Height = 113 | |
89 | + Hint = 'Aplicáveis ao longo de todo o experimento' | |
90 | + Top = 274 | |
91 | + Width = 619 | |
92 | + AutoFill = True | |
93 | + Caption = 'Configurações globais' | |
94 | + ChildSizing.LeftRightSpacing = 6 | |
95 | + ChildSizing.TopBottomSpacing = 6 | |
96 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
97 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
98 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
99 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
100 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
101 | + ChildSizing.ControlsPerLine = 1 | |
102 | + ClientHeight = 96 | |
103 | + ClientWidth = 615 | |
104 | + Items.Strings = ( | |
105 | + 'Enviar histórico do bate-papo a novos participantes' | |
106 | + 'Gerar participantes automaticamente' | |
107 | + 'Habilitar matrix para o pesquisador jogar' | |
108 | + 'Habilitar bate-papo para o pesquisador' | |
109 | + ) | |
110 | + TabOrder = 3 | |
111 | + Data = { | |
112 | + 0400000002030202 | |
113 | + } | |
114 | + end | |
115 | + object RGPoints: TRadioGroup | |
116 | + Left = 0 | |
117 | + Height = 59 | |
118 | + Top = 392 | |
119 | + Width = 619 | |
120 | + AutoFill = True | |
121 | + Caption = 'Tipo de pontuação' | |
122 | + ChildSizing.LeftRightSpacing = 6 | |
123 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
124 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
125 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
126 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
127 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
128 | + ChildSizing.ControlsPerLine = 1 | |
129 | + ClientHeight = 42 | |
130 | + ClientWidth = 615 | |
131 | + ItemIndex = 0 | |
132 | + Items.Strings = ( | |
133 | + 'A e B' | |
134 | + 'Apenas um tipo' | |
135 | + ) | |
136 | + OnClick = RGPointsClick | |
137 | + TabOrder = 4 | |
138 | + end | |
139 | + object CGMatrix: TCheckGroup | |
140 | + Left = 0 | |
141 | + Height = 134 | |
142 | + Top = 456 | |
143 | + Width = 619 | |
144 | + AutoFill = True | |
145 | + Caption = 'Tipo da matrix' | |
146 | + ChildSizing.LeftRightSpacing = 6 | |
147 | + ChildSizing.TopBottomSpacing = 6 | |
148 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
149 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
150 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
151 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
152 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
153 | + ChildSizing.ControlsPerLine = 1 | |
154 | + ClientHeight = 117 | |
155 | + ClientWidth = 615 | |
156 | + Items.Strings = ( | |
157 | + '5 cores' | |
158 | + '10 Linhas' | |
159 | + '10 Colunas' | |
160 | + 'Círculos' | |
161 | + 'Círculos Vazados' | |
162 | + ) | |
163 | + TabOrder = 5 | |
164 | + Data = { | |
165 | + 050000000303020202 | |
166 | + } | |
167 | + end | |
168 | + object GBConditions: TGroupBox | |
169 | + Left = 0 | |
170 | + Height = 97 | |
171 | + Top = 595 | |
172 | + Width = 619 | |
173 | + Caption = 'Condições' | |
174 | + ClientHeight = 80 | |
175 | + ClientWidth = 615 | |
176 | + TabOrder = 6 | |
177 | + object ListBoxConditions: TListBox | |
178 | + Left = 0 | |
179 | + Height = 80 | |
180 | + Top = 0 | |
181 | + Width = 615 | |
182 | + Anchors = [akTop, akLeft, akRight] | |
183 | + ItemHeight = 0 | |
184 | + ScrollWidth = 613 | |
185 | + TabOrder = 0 | |
186 | + TopIndex = -1 | |
187 | + end | |
188 | + end | |
189 | + end | |
190 | + object TabSheetConditions: TTabSheet | |
191 | + Caption = 'Condições' | |
192 | + ChildSizing.TopBottomSpacing = 10 | |
193 | + ChildSizing.VerticalSpacing = 5 | |
194 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
195 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
196 | + ChildSizing.ControlsPerLine = 1 | |
197 | + ClientHeight = 678 | |
198 | + ClientWidth = 640 | |
199 | + object ComboCurrentCondition: TComboBox | |
200 | + Left = 0 | |
201 | + Height = 27 | |
202 | + Top = 10 | |
203 | + Width = 640 | |
204 | + ItemHeight = 0 | |
205 | + Style = csDropDownList | |
206 | + TabOrder = 0 | |
207 | + end | |
208 | + object PanelConditionButtons: TPanel | |
209 | + Left = 0 | |
210 | + Height = 26 | |
211 | + Top = 42 | |
212 | + Width = 640 | |
213 | + ChildSizing.LeftRightSpacing = 25 | |
214 | + ChildSizing.HorizontalSpacing = 50 | |
215 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
216 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
217 | + ChildSizing.ControlsPerLine = 3 | |
218 | + ClientHeight = 26 | |
219 | + ClientWidth = 640 | |
220 | + TabOrder = 1 | |
221 | + object BtnAppendCond: TButton | |
222 | + Left = 25 | |
223 | + Height = 25 | |
224 | + Top = 0 | |
225 | + Width = 162 | |
226 | + Caption = 'Adicionar' | |
227 | + TabOrder = 0 | |
228 | + end | |
229 | + object BtnRemoveCond: TButton | |
230 | + Left = 237 | |
231 | + Height = 25 | |
232 | + Top = 0 | |
233 | + Width = 159 | |
234 | + Caption = 'Remover' | |
235 | + TabOrder = 1 | |
236 | + end | |
237 | + object BtnReorderCond: TButton | |
238 | + Left = 446 | |
239 | + Height = 25 | |
240 | + Top = 0 | |
241 | + Width = 169 | |
242 | + Caption = 'Reordenar' | |
243 | + TabOrder = 2 | |
244 | + end | |
245 | + end | |
246 | + object LabelConditionName: TLabel | |
247 | + Left = 0 | |
248 | + Height = 15 | |
249 | + Hint = 'Nome da condição no relatório.' | |
250 | + Top = 73 | |
251 | + Width = 640 | |
252 | + Caption = 'Nome da Condição' | |
253 | + ParentColor = False | |
254 | + end | |
255 | + object EditConditionName: TEdit | |
256 | + Left = 0 | |
257 | + Height = 25 | |
258 | + Top = 93 | |
259 | + Width = 640 | |
260 | + TabOrder = 2 | |
261 | + end | |
262 | + object LabelTurnValue: TLabel | |
263 | + Left = 0 | |
264 | + Height = 15 | |
265 | + Top = 123 | |
266 | + Width = 640 | |
267 | + Caption = 'Número de Jogadores / Turnos' | |
268 | + ParentColor = False | |
269 | + end | |
270 | + object SpinEditTurnValue: TSpinEdit | |
271 | + Left = 0 | |
272 | + Height = 25 | |
273 | + Top = 143 | |
274 | + Width = 640 | |
275 | + MaxValue = 5 | |
276 | + MinValue = 2 | |
277 | + TabOrder = 3 | |
278 | + Value = 2 | |
279 | + end | |
280 | + object LabelCyclesValue: TLabel | |
281 | + Left = 0 | |
282 | + Height = 15 | |
283 | + Top = 173 | |
284 | + Width = 640 | |
285 | + Caption = 'Ciclos para mudança de geração / linhagem' | |
286 | + ParentColor = False | |
287 | + end | |
288 | + object SpinEditCyclesValue: TSpinEdit | |
289 | + Left = 0 | |
290 | + Height = 25 | |
291 | + Top = 193 | |
292 | + Width = 640 | |
293 | + MaxValue = 1000 | |
294 | + MinValue = 1 | |
295 | + TabOrder = 4 | |
296 | + Value = 1 | |
297 | + end | |
298 | + object GBQuestion: TGroupBox | |
299 | + Left = 0 | |
300 | + Height = 144 | |
301 | + Top = 223 | |
302 | + Width = 640 | |
303 | + Caption = 'Apresentar pergunta ao final do ciclo' | |
304 | + ChildSizing.LeftRightSpacing = 50 | |
305 | + ChildSizing.VerticalSpacing = 5 | |
306 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
307 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
308 | + ChildSizing.ControlsPerLine = 1 | |
309 | + ClientHeight = 127 | |
310 | + ClientWidth = 636 | |
311 | + TabOrder = 8 | |
312 | + object CheckBoxShouldAskQuestion: TCheckBox | |
313 | + Left = 50 | |
314 | + Height = 21 | |
315 | + Top = 0 | |
316 | + Width = 536 | |
317 | + Caption = 'Não' | |
318 | + OnChange = CheckBoxShouldAskQuestionChange | |
319 | + TabOrder = 0 | |
320 | + end | |
321 | + object EditQuestion: TEdit | |
322 | + Left = 50 | |
323 | + Height = 25 | |
324 | + Top = 26 | |
325 | + Width = 536 | |
326 | + TabOrder = 1 | |
327 | + Text = 'Um item escolar foi perdido, desejam recuperá-lo gastando pontos do Tipo A?' | |
328 | + Visible = False | |
329 | + end | |
330 | + object CGQuestion: TCheckGroup | |
331 | + Left = 50 | |
332 | + Height = 71 | |
333 | + Top = 56 | |
334 | + Width = 536 | |
335 | + AutoFill = True | |
336 | + Caption = 'O que deve acontecer quando todos responderem sim?' | |
337 | + ChildSizing.LeftRightSpacing = 6 | |
338 | + ChildSizing.TopBottomSpacing = 6 | |
339 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
340 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
341 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
342 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
343 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
344 | + ChildSizing.ControlsPerLine = 1 | |
345 | + ClientHeight = 54 | |
346 | + ClientWidth = 532 | |
347 | + Items.Strings = ( | |
348 | + 'Reverter consequências das metacontingências e contingências' | |
349 | + 'Inverter pontos A e B quando pontos B forem consequências' | |
350 | + ) | |
351 | + TabOrder = 2 | |
352 | + Visible = False | |
353 | + Data = { | |
354 | + 020000000303 | |
355 | + } | |
356 | + end | |
357 | + end | |
358 | + object RGEndCriteriaStyle: TRadioGroup | |
359 | + Left = 0 | |
360 | + Height = 80 | |
361 | + Top = 372 | |
362 | + Width = 640 | |
363 | + AutoFill = True | |
364 | + Caption = 'Estilo do critério de finalização da condição' | |
365 | + ChildSizing.LeftRightSpacing = 6 | |
366 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
367 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
368 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
369 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
370 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
371 | + ChildSizing.ControlsPerLine = 1 | |
372 | + ClientHeight = 63 | |
373 | + ClientWidth = 636 | |
374 | + ItemIndex = 2 | |
375 | + Items.Strings = ( | |
376 | + 'Finalizar após um número de ciclos' | |
377 | + 'Finalizar quando uma porcentagem de entrelaçamentos for atingida' | |
378 | + 'O que ocorrer primeiro (ciclos ou entrelaçamentos)' | |
379 | + ) | |
380 | + OnClick = RGEndCriteriaStyleClick | |
381 | + TabOrder = 6 | |
382 | + end | |
383 | + object GBEndCriteria: TGroupBox | |
384 | + Left = 0 | |
385 | + Height = 109 | |
386 | + Top = 457 | |
387 | + Width = 640 | |
388 | + Caption = 'Valores do critério de finalização da condição' | |
389 | + ChildSizing.LeftRightSpacing = 50 | |
390 | + ChildSizing.VerticalSpacing = 5 | |
391 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
392 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
393 | + ChildSizing.ControlsPerLine = 1 | |
394 | + ClientHeight = 92 | |
395 | + ClientWidth = 636 | |
396 | + TabOrder = 5 | |
397 | + object LabelEndCriteriaAbsCycles: TLabel | |
398 | + Left = 50 | |
399 | + Height = 15 | |
400 | + Top = 0 | |
401 | + Width = 536 | |
402 | + Caption = 'Número de ciclos' | |
403 | + ParentColor = False | |
404 | + end | |
405 | + object SpinEditEndCriteriaAbsCycles: TSpinEdit | |
406 | + Left = 50 | |
407 | + Height = 25 | |
408 | + Top = 20 | |
409 | + Width = 536 | |
410 | + MaxValue = 1000 | |
411 | + TabOrder = 0 | |
412 | + Value = 20 | |
413 | + end | |
414 | + object GBEndCriteriaLastCycles: TGroupBox | |
415 | + Left = 50 | |
416 | + Height = 42 | |
417 | + Top = 50 | |
418 | + Width = 536 | |
419 | + Caption = 'Porcentagem de entrelaçamentos' | |
420 | + ChildSizing.HorizontalSpacing = 5 | |
421 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
422 | + ChildSizing.ControlsPerLine = 4 | |
423 | + ClientHeight = 25 | |
424 | + ClientWidth = 532 | |
425 | + TabOrder = 1 | |
426 | + object SpinEditEndCriteriaInterlockingPorcentage: TSpinEdit | |
427 | + Left = 0 | |
428 | + Height = 25 | |
429 | + Top = 0 | |
430 | + Width = 50 | |
431 | + TabOrder = 0 | |
432 | + Value = 80 | |
433 | + end | |
434 | + object LabelEndCriteriaInt: TLabel | |
435 | + Left = 55 | |
436 | + Height = 25 | |
437 | + Top = 0 | |
438 | + Width = 206 | |
439 | + Alignment = taCenter | |
440 | + Caption = '% de entrelaçamentos nos últimos ' | |
441 | + Layout = tlCenter | |
442 | + ParentColor = False | |
443 | + end | |
444 | + object SpinEditEndCriteriaLastCycles: TSpinEdit | |
445 | + Left = 266 | |
446 | + Height = 25 | |
447 | + Top = 0 | |
448 | + Width = 50 | |
449 | + MaxValue = 1000 | |
450 | + MinValue = 2 | |
451 | + TabOrder = 1 | |
452 | + Value = 10 | |
453 | + end | |
454 | + object LabelEndCriteriaLastCycles: TLabel | |
455 | + Left = 321 | |
456 | + Height = 25 | |
457 | + Top = 0 | |
458 | + Width = 35 | |
459 | + Alignment = taCenter | |
460 | + Caption = 'ciclos.' | |
461 | + Layout = tlCenter | |
462 | + ParentColor = False | |
463 | + end | |
464 | + end | |
465 | + end | |
466 | + object GBContingencies: TGroupBox | |
467 | + Left = 0 | |
468 | + Height = 97 | |
469 | + Top = 571 | |
470 | + Width = 640 | |
471 | + Caption = 'Contingências e Metacontingências' | |
472 | + ClientHeight = 80 | |
473 | + ClientWidth = 636 | |
474 | + TabOrder = 7 | |
475 | + object ListBoxContingencies: TListBox | |
476 | + Left = 0 | |
477 | + Height = 80 | |
478 | + Top = 0 | |
479 | + Width = 636 | |
480 | + Anchors = [akTop, akLeft, akRight] | |
481 | + ItemHeight = 0 | |
482 | + ScrollWidth = 634 | |
483 | + TabOrder = 0 | |
484 | + TopIndex = -1 | |
485 | + end | |
486 | + end | |
487 | + end | |
488 | + object TabSheetContingencies: TTabSheet | |
489 | + Caption = 'Contingências' | |
490 | + ChildSizing.TopBottomSpacing = 10 | |
491 | + ChildSizing.VerticalSpacing = 5 | |
492 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
493 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
494 | + ChildSizing.ControlsPerLine = 1 | |
495 | + ClientHeight = 678 | |
496 | + ClientWidth = 640 | |
497 | + object ComboCurrentContingency: TComboBox | |
498 | + Left = 0 | |
499 | + Height = 27 | |
500 | + Top = 10 | |
501 | + Width = 650 | |
502 | + ItemHeight = 0 | |
503 | + Style = csDropDownList | |
504 | + TabOrder = 0 | |
505 | + end | |
506 | + object PanelContingenciesButtons: TPanel | |
507 | + Left = 0 | |
508 | + Height = 26 | |
509 | + Top = 42 | |
510 | + Width = 650 | |
511 | + ChildSizing.LeftRightSpacing = 25 | |
512 | + ChildSizing.HorizontalSpacing = 50 | |
513 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
514 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
515 | + ChildSizing.ControlsPerLine = 3 | |
516 | + ClientHeight = 26 | |
517 | + ClientWidth = 650 | |
518 | + TabOrder = 1 | |
519 | + object BtnAppendContingency: TButton | |
520 | + Left = 25 | |
521 | + Height = 25 | |
522 | + Top = 0 | |
523 | + Width = 166 | |
524 | + Caption = 'Adicionar' | |
525 | + TabOrder = 0 | |
526 | + end | |
527 | + object BtnRemoveContingency: TButton | |
528 | + Left = 241 | |
529 | + Height = 25 | |
530 | + Top = 0 | |
531 | + Width = 163 | |
532 | + Caption = 'Remover' | |
533 | + TabOrder = 1 | |
534 | + end | |
535 | + object BtnReorderContingency: TButton | |
536 | + Left = 454 | |
537 | + Height = 25 | |
538 | + Top = 0 | |
539 | + Width = 171 | |
540 | + Caption = 'Reordenar' | |
541 | + TabOrder = 2 | |
542 | + end | |
543 | + end | |
544 | + object CheckBoxIsMeta: TCheckBox | |
545 | + Left = 0 | |
546 | + Height = 21 | |
547 | + Top = 73 | |
548 | + Width = 650 | |
549 | + Caption = 'Meta' | |
550 | + OnChange = CheckBoxIsMetaChange | |
551 | + TabOrder = 2 | |
552 | + end | |
553 | + object LabelContingencyName: TLabel | |
554 | + Left = 0 | |
555 | + Height = 15 | |
556 | + Top = 99 | |
557 | + Width = 650 | |
558 | + Caption = 'Nome da contingência' | |
559 | + ParentColor = False | |
560 | + end | |
561 | + object EditContingencyName: TEdit | |
562 | + Left = 0 | |
563 | + Height = 25 | |
564 | + Top = 119 | |
565 | + Width = 650 | |
566 | + TabOrder = 3 | |
567 | + end | |
568 | + object RGContingencyStyle: TRadioGroup | |
569 | + Left = 0 | |
570 | + Height = 122 | |
571 | + Top = 149 | |
572 | + Width = 650 | |
573 | + AutoFill = True | |
574 | + Caption = 'Estilo da Resposta' | |
575 | + ChildSizing.LeftRightSpacing = 6 | |
576 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
577 | + ChildSizing.EnlargeVertical = crsHomogenousChildResize | |
578 | + ChildSizing.ShrinkHorizontal = crsScaleChilds | |
579 | + ChildSizing.ShrinkVertical = crsScaleChilds | |
580 | + ChildSizing.Layout = cclLeftToRightThenTopToBottom | |
581 | + ChildSizing.ControlsPerLine = 1 | |
582 | + ClientHeight = 105 | |
583 | + ClientWidth = 646 | |
584 | + ItemIndex = 0 | |
585 | + Items.Strings = ( | |
586 | + 'Extinção' | |
587 | + 'Linhas' | |
588 | + 'Cores' | |
589 | + 'Linhas e Cores' | |
590 | + 'Linhas ou Cores' | |
591 | + ) | |
592 | + OnClick = RGContingencyStyleClick | |
593 | + TabOrder = 4 | |
594 | + end | |
595 | + object LabelIf: TLabel | |
596 | + Left = 0 | |
597 | + Height = 15 | |
598 | + Top = 276 | |
599 | + Width = 650 | |
600 | + Alignment = taCenter | |
601 | + Caption = 'SE' | |
602 | + ParentColor = False | |
603 | + Visible = False | |
604 | + end | |
605 | + object GBContingencyRows: TGroupBox | |
606 | + Left = 0 | |
607 | + Height = 40 | |
608 | + Top = 296 | |
609 | + Width = 650 | |
610 | + Caption = 'Linhas' | |
611 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
612 | + ChildSizing.Layout = cclTopToBottomThenLeftToRight | |
613 | + ChildSizing.ControlsPerLine = 1 | |
614 | + ClientHeight = 23 | |
615 | + ClientWidth = 646 | |
616 | + TabOrder = 5 | |
617 | + Visible = False | |
618 | + object ComboBoxRows: TComboBox | |
619 | + Left = 0 | |
620 | + Height = 23 | |
621 | + Top = 0 | |
622 | + Width = 646 | |
623 | + ItemHeight = 0 | |
624 | + ItemIndex = 0 | |
625 | + Items.Strings = ( | |
626 | + '1' | |
627 | + '2' | |
628 | + '3' | |
629 | + '4' | |
630 | + '5' | |
631 | + '6' | |
632 | + '7' | |
633 | + '8' | |
634 | + '9' | |
635 | + '10' | |
636 | + 'PARES' | |
637 | + 'IMPARES' | |
638 | + 'TUDO EXCETO PARES' | |
639 | + 'TUDO EXCETO IMPARES' | |
640 | + ) | |
641 | + Style = csDropDownList | |
642 | + TabOrder = 0 | |
643 | + Text = '1' | |
644 | + end | |
645 | + end | |
646 | + object LabelOperator: TLabel | |
647 | + Left = 0 | |
648 | + Height = 15 | |
649 | + Top = 341 | |
650 | + Width = 650 | |
651 | + Alignment = taCenter | |
652 | + Caption = 'E' | |
653 | + ParentColor = False | |
654 | + Visible = False | |
655 | + end | |
656 | + object GBContingencyColors: TGroupBox | |
657 | + Left = 0 | |
658 | + Height = 40 | |
659 | + Top = 361 | |
660 | + Width = 650 | |
661 | + Caption = 'Cores' | |
662 | + ClientHeight = 23 | |
663 | + ClientWidth = 646 | |
664 | + TabOrder = 6 | |
665 | + Visible = False | |
666 | + object ComboBoxColors: TComboBox | |
667 | + Left = 0 | |
668 | + Height = 27 | |
669 | + Top = 0 | |
670 | + Width = 641 | |
671 | + ItemHeight = 0 | |
672 | + ItemIndex = 5 | |
673 | + Items.Strings = ( | |
674 | + 'AMARELO' | |
675 | + 'VERMELHO' | |
676 | + 'ROXO' | |
677 | + 'AZUL' | |
678 | + 'VERDE' | |
679 | + 'DIFERENTES' | |
680 | + 'IGUAIS' | |
681 | + ) | |
682 | + Style = csDropDownList | |
683 | + TabOrder = 0 | |
684 | + Text = 'DIFERENTES' | |
685 | + end | |
686 | + end | |
687 | + object LabelThen: TLabel | |
688 | + Left = 0 | |
689 | + Height = 15 | |
690 | + Top = 406 | |
691 | + Width = 650 | |
692 | + Alignment = taCenter | |
693 | + Caption = 'ENTÃO' | |
694 | + ParentColor = False | |
695 | + Visible = False | |
696 | + end | |
697 | + object GBContingencyConsequence: TGroupBox | |
698 | + Left = 0 | |
699 | + Height = 59 | |
700 | + Top = 426 | |
701 | + Width = 650 | |
702 | + Caption = 'Consequência' | |
703 | + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | |
704 | + ChildSizing.Layout = cclTopToBottomThenLeftToRight | |
705 | + ChildSizing.ControlsPerLine = 2 | |
706 | + ClientHeight = 42 | |
707 | + ClientWidth = 646 | |
708 | + TabOrder = 7 | |
709 | + Visible = False | |
710 | + object LabelC1: TLabel | |
711 | + Left = 0 | |
712 | + Height = 15 | |
713 | + Top = 0 | |
714 | + Width = 134 | |
715 | + Caption = 'Prefixo' | |
716 | + ParentColor = False | |
717 | + end | |
718 | + object EditMessPrefix: TEdit | |
719 | + Left = 0 | |
720 | + Height = 27 | |
721 | + Top = 15 | |
722 | + Width = 134 | |
723 | + TabOrder = 0 | |
724 | + Text = '$NICNAME produziu' | |
725 | + end | |
726 | + object LabelC4: TLabel | |
727 | + Left = 134 | |
728 | + Height = 15 | |
729 | + Top = 0 | |
730 | + Width = 104 | |
731 | + Caption = 'Pontos' | |
732 | + ParentColor = False | |
733 | + end | |
734 | + object SpinEditContingencyPoints: TSpinEdit | |
735 | + Left = 134 | |
736 | + Height = 27 | |
737 | + Top = 15 | |
738 | + Width = 104 | |
739 | + MaxValue = 1000 | |
740 | + TabOrder = 2 | |
741 | + Value = 1 | |
742 | + end | |
743 | + object LabelC6: TLabel | |
744 | + Left = 238 | |
745 | + Height = 15 | |
746 | + Top = 0 | |
747 | + Width = 154 | |
748 | + Caption = 'do Tipo' | |
749 | + ParentColor = False | |
750 | + end | |
751 | + object CBPointsType: TComboBox | |
752 | + Left = 238 | |
753 | + Height = 27 | |
754 | + Top = 15 | |
755 | + Width = 154 | |
756 | + ItemHeight = 0 | |
757 | + Style = csDropDownList | |
758 | + TabOrder = 4 | |
759 | + end | |
760 | + object LabelC2: TLabel | |
761 | + Left = 392 | |
762 | + Height = 15 | |
763 | + Top = 0 | |
764 | + Width = 134 | |
765 | + Caption = 'Sufixo' | |
766 | + ParentColor = False | |
767 | + end | |
768 | + object EditMessSufix: TEdit | |
769 | + Left = 392 | |
770 | + Height = 27 | |
771 | + Top = 15 | |
772 | + Width = 134 | |
773 | + TabOrder = 1 | |
774 | + Text = 'ponto.' | |
775 | + end | |
776 | + object LabelC5: TLabel | |
777 | + Left = 526 | |
778 | + Height = 15 | |
779 | + Top = 0 | |
780 | + Width = 120 | |
781 | + Caption = 'Apresentar' | |
782 | + ParentColor = False | |
783 | + end | |
784 | + object CheckBoxBroadcast: TCheckBox | |
785 | + Left = 526 | |
786 | + Height = 27 | |
787 | + Top = 15 | |
788 | + Width = 120 | |
789 | + Caption = 'a todos' | |
790 | + Checked = True | |
791 | + OnChange = CheckBoxBroadcastChange | |
792 | + State = cbChecked | |
793 | + TabOrder = 3 | |
794 | + end | |
795 | + end | |
796 | + end | |
797 | + end | |
798 | + object MainMenu1: TMainMenu | |
799 | + left = 552 | |
800 | + top = 8 | |
801 | + object MenuItemFile: TMenuItem | |
802 | + Caption = 'Arquivo' | |
803 | + object MenuItemOpen: TMenuItem | |
804 | + Caption = 'Abrir' | |
805 | + OnClick = MenuItemOpenClick | |
806 | + end | |
807 | + object MenuItemSeparator1: TMenuItem | |
808 | + Caption = '-' | |
809 | + end | |
810 | + object MenuItemExit: TMenuItem | |
811 | + Caption = 'Exit' | |
812 | + OnClick = MenuItemExitClick | |
813 | + end | |
814 | + end | |
815 | + end | |
816 | + object OpenDialog: TOpenDialog | |
817 | + left = 464 | |
818 | + top = 8 | |
819 | + end | |
820 | + object XMLPropStorage: TXMLPropStorage | |
821 | + StoredValues = <> | |
822 | + FileName = 'persistence.xml' | |
823 | + OnSavingProperties = XMLPropStorageSavingProperties | |
824 | + OnRestoreProperties = XMLPropStorageRestoreProperties | |
825 | + left = 464 | |
826 | + top = 64 | |
827 | + end | |
828 | +end | ... | ... |
... | ... | @@ -0,0 +1,337 @@ |
1 | +unit form_main; | |
2 | + | |
3 | +{$mode objfpc}{$H+} | |
4 | + | |
5 | +interface | |
6 | + | |
7 | +uses | |
8 | + Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, | |
9 | + Menus, ExtCtrls, StdCtrls, XMLPropStorage, IniFiles, Spin; | |
10 | + | |
11 | +type | |
12 | + | |
13 | + { TFormDesigner } | |
14 | + | |
15 | + TFormDesigner = class(TForm) | |
16 | + BtnAppendCond: TButton; | |
17 | + BtnAppendContingency: TButton; | |
18 | + BtnRemoveCond: TButton; | |
19 | + BtnRemoveContingency: TButton; | |
20 | + BtnReorderCond: TButton; | |
21 | + BtnReorderContingency: TButton; | |
22 | + CGGlobal: TCheckGroup; | |
23 | + CGMatrix: TCheckGroup; | |
24 | + CheckBoxBroadcast: TCheckBox; | |
25 | + CheckBoxIsMeta: TCheckBox; | |
26 | + CheckBoxShouldAskQuestion: TCheckBox; | |
27 | + CGQuestion: TCheckGroup; | |
28 | + ComboBoxRows: TComboBox; | |
29 | + ComboBoxColors: TComboBox; | |
30 | + CBPointsType: TComboBox; | |
31 | + ComboCurrentCondition: TComboBox; | |
32 | + ComboCurrentContingency: TComboBox; | |
33 | + EditMessPrefix: TEdit; | |
34 | + EditMessSufix: TEdit; | |
35 | + EditContingencyName: TEdit; | |
36 | + EditQuestion: TEdit; | |
37 | + EditConditionName: TEdit; | |
38 | + EditExperimentName: TEdit; | |
39 | + EditResearcherName: TEdit; | |
40 | + GBContingencies: TGroupBox; | |
41 | + GBContingencyColors: TGroupBox; | |
42 | + GBExperimentAim: TGroupBox; | |
43 | + GBConditions: TGroupBox; | |
44 | + GBEndCriteria: TGroupBox; | |
45 | + GBEndCriteriaLastCycles: TGroupBox; | |
46 | + GBQuestion: TGroupBox; | |
47 | + GBContingencyRows: TGroupBox; | |
48 | + GBContingencyConsequence: TGroupBox; | |
49 | + LabelC1: TLabel; | |
50 | + LabelC2: TLabel; | |
51 | + LabelC4: TLabel; | |
52 | + LabelC5: TLabel; | |
53 | + LabelC6: TLabel; | |
54 | + LabelThen: TLabel; | |
55 | + LabelOperator: TLabel; | |
56 | + LabelContingencyName: TLabel; | |
57 | + LabelEndCriteriaInt: TLabel; | |
58 | + LabelEndCriteriaLastCycles: TLabel; | |
59 | + LabelEndCriteriaAbsCycles: TLabel; | |
60 | + LabelCyclesValue: TLabel; | |
61 | + LabelIf: TLabel; | |
62 | + LabelTurnValue: TLabel; | |
63 | + LabelConditionName: TLabel; | |
64 | + LabelExperimentName: TLabel; | |
65 | + LabelResearcherName: TLabel; | |
66 | + ListBoxConditions: TListBox; | |
67 | + ListBoxContingencies: TListBox; | |
68 | + MainMenu1: TMainMenu; | |
69 | + MemoExperimentAim: TMemo; | |
70 | + MenuItemFile: TMenuItem; | |
71 | + MenuItemExit: TMenuItem; | |
72 | + MenuItemOpen: TMenuItem; | |
73 | + MenuItemSeparator1: TMenuItem; | |
74 | + OpenDialog: TOpenDialog; | |
75 | + PageControl: TPageControl; | |
76 | + PanelConditionButtons: TPanel; | |
77 | + PanelContingenciesButtons: TPanel; | |
78 | + RGContingencyStyle: TRadioGroup; | |
79 | + RGEndCriteriaStyle: TRadioGroup; | |
80 | + RGPoints: TRadioGroup; | |
81 | + SpinEditContingencyPoints: TSpinEdit; | |
82 | + SpinEditEndCriteriaInterlockingPorcentage: TSpinEdit; | |
83 | + SpinEditEndCriteriaLastCycles: TSpinEdit; | |
84 | + SpinEditEndCriteriaAbsCycles: TSpinEdit; | |
85 | + SpinEditCyclesValue: TSpinEdit; | |
86 | + SpinEditTurnValue: TSpinEdit; | |
87 | + TabSheetContingencies: TTabSheet; | |
88 | + TabSheetConditions: TTabSheet; | |
89 | + TabSheetExperiment: TTabSheet; | |
90 | + XMLPropStorage: TXMLPropStorage; | |
91 | + procedure CheckBoxBroadcastChange(Sender: TObject); | |
92 | + procedure CheckBoxIsMetaChange(Sender: TObject); | |
93 | + procedure CheckBoxShouldAskQuestionChange(Sender: TObject); | |
94 | + procedure FormCreate(Sender: TObject); | |
95 | + procedure FormDestroy(Sender: TObject); | |
96 | + procedure MenuItemExitClick(Sender: TObject); | |
97 | + procedure MenuItemOpenClick(Sender: TObject); | |
98 | + procedure RGContingencyStyleClick(Sender: TObject); | |
99 | + procedure RGEndCriteriaStyleClick(Sender: TObject); | |
100 | + procedure RGPointsClick(Sender: TObject); | |
101 | + procedure XMLPropStorageRestoreProperties(Sender: TObject); | |
102 | + procedure XMLPropStorageSavingProperties(Sender: TObject); | |
103 | + private | |
104 | + FExperiment : TIniFile; | |
105 | + public | |
106 | + { public declarations } | |
107 | + end; | |
108 | + | |
109 | +var | |
110 | + FormDesigner: TFormDesigner; | |
111 | + | |
112 | +implementation | |
113 | + | |
114 | +uses game_resources, game_file_methods; | |
115 | + | |
116 | +{$R *.lfm} | |
117 | + | |
118 | +{ TFormDesigner } | |
119 | + | |
120 | + | |
121 | +procedure TFormDesigner.MenuItemOpenClick(Sender: TObject); | |
122 | +begin | |
123 | + if OpenDialog.Execute then | |
124 | + begin | |
125 | + if FExperiment.FileName = OpenDialog.FileName then Exit; | |
126 | + FExperiment := TIniFile.Create(OpenDialog.FileName); | |
127 | + end; | |
128 | +end; | |
129 | + | |
130 | +procedure TFormDesigner.RGContingencyStyleClick(Sender: TObject); | |
131 | +var LVisible : Boolean; | |
132 | +begin | |
133 | + LVisible := True; | |
134 | + case TRadioGroup(Sender).ItemIndex of | |
135 | + 0: | |
136 | + begin | |
137 | + LabelIf.Visible:= not LVisible; | |
138 | + LabelThen.Visible:= not LVisible; | |
139 | + LabelOperator.Visible:= not LVisible; | |
140 | + GBContingencyRows.Visible:= not LVisible; | |
141 | + GBContingencyColors.Visible:= not LVisible; | |
142 | + GBContingencyConsequence.Visible:= not LVisible; | |
143 | + end; | |
144 | + | |
145 | + 1: | |
146 | + begin | |
147 | + LabelIf.Visible:= LVisible; | |
148 | + LabelThen.Visible:= LVisible; | |
149 | + LabelOperator.Visible:= not LVisible; | |
150 | + GBContingencyRows.Visible:= LVisible; | |
151 | + GBContingencyColors.Visible:= not LVisible; | |
152 | + GBContingencyConsequence.Visible:= LVisible; | |
153 | + end; | |
154 | + | |
155 | + 2: | |
156 | + begin | |
157 | + LabelIf.Visible:= LVisible; | |
158 | + LabelThen.Visible:= LVisible; | |
159 | + LabelOperator.Visible:= not LVisible; | |
160 | + GBContingencyRows.Visible:= not LVisible; | |
161 | + GBContingencyColors.Visible:= LVisible; | |
162 | + GBContingencyConsequence.Visible:= LVisible; | |
163 | + end; | |
164 | + 3: | |
165 | + begin | |
166 | + LabelIf.Visible:= LVisible; | |
167 | + LabelThen.Visible:= LVisible; | |
168 | + LabelOperator.Caption:='E'; | |
169 | + LabelOperator.Visible:= LVisible; | |
170 | + GBContingencyRows.Visible:= LVisible; | |
171 | + GBContingencyColors.Visible:= LVisible; | |
172 | + GBContingencyConsequence.Visible:= LVisible; | |
173 | + end; | |
174 | + 4: | |
175 | + begin | |
176 | + LabelIf.Visible:= LVisible; | |
177 | + LabelThen.Visible:= LVisible; | |
178 | + LabelOperator.Caption:='OU'; | |
179 | + LabelOperator.Visible:= LVisible; | |
180 | + GBContingencyRows.Visible:= LVisible; | |
181 | + GBContingencyColors.Visible:= LVisible; | |
182 | + GBContingencyConsequence.Visible:= LVisible; | |
183 | + end; | |
184 | + end; | |
185 | + CheckBoxIsMetaChange(CheckBoxIsMeta); | |
186 | +end; | |
187 | + | |
188 | +procedure TFormDesigner.RGEndCriteriaStyleClick(Sender: TObject); | |
189 | +begin | |
190 | + case TRadioGroup(Sender).ItemIndex of | |
191 | + 0: | |
192 | + begin | |
193 | + LabelEndCriteriaAbsCycles.Visible := True; | |
194 | + SpinEditEndCriteriaAbsCycles.Visible:= True; | |
195 | + GBEndCriteriaLastCycles.Visible:= False; | |
196 | + | |
197 | + end; | |
198 | + 1: | |
199 | + begin | |
200 | + LabelEndCriteriaAbsCycles.Visible := False; | |
201 | + SpinEditEndCriteriaAbsCycles.Visible:= False; | |
202 | + GBEndCriteriaLastCycles.Visible:= True; | |
203 | + end; | |
204 | + 2: | |
205 | + begin | |
206 | + LabelEndCriteriaAbsCycles.Visible := True; | |
207 | + SpinEditEndCriteriaAbsCycles.Visible:= True; | |
208 | + GBEndCriteriaLastCycles.Visible:= True; | |
209 | + end; | |
210 | + end; | |
211 | +end; | |
212 | + | |
213 | +procedure TFormDesigner.RGPointsClick(Sender: TObject); | |
214 | +begin | |
215 | + case TRadioGroup(Sender).ItemIndex of | |
216 | + 0: | |
217 | + begin | |
218 | + CBPointsType.Items.Clear; | |
219 | + CBPointsType.Items.Append('Individual A'); | |
220 | + CBPointsType.Items.Append('Individual B'); | |
221 | + CBPointsType.Items.Append('Para o Grupo'); | |
222 | + end; | |
223 | + | |
224 | + 1: | |
225 | + begin | |
226 | + CBPointsType.Items.Clear; | |
227 | + CBPointsType.Items.Append('Individual'); | |
228 | + CBPointsType.Items.Append('Para o Grupo'); | |
229 | + end; | |
230 | + end; | |
231 | +end; | |
232 | + | |
233 | +procedure TFormDesigner.XMLPropStorageRestoreProperties(Sender: TObject); | |
234 | +//var | |
235 | +// i: Integer; | |
236 | +begin | |
237 | + //for i := 0 to CGGlobal.Items.Count-1 do | |
238 | + // CGGlobal.Checked[i] := StrToBool(XMLPropStorage.StoredValue['CGGLobal.Checked'+IntToStr(i)]); | |
239 | + // | |
240 | + //for i := 0 to CGMatrix.Items.Count-1 do | |
241 | + // CGMatrix.Checked[i] := StrToBool(XMLPropStorage.StoredValue['CGMatrix.Checked'+IntToStr(i)]); | |
242 | +end; | |
243 | + | |
244 | +procedure TFormDesigner.XMLPropStorageSavingProperties(Sender: TObject); | |
245 | +//var | |
246 | +// i: Integer; | |
247 | +begin | |
248 | + //for i := 0 to CGGlobal.Items.Count-1 do | |
249 | + // XMLPropStorage.StoredValue['CGGLobal.Checked'+IntToStr(i)] := BoolToStr(CGGLobal.Checked[i]); | |
250 | + // | |
251 | + //for i := 0 to CGMatrix.Items.Count-1 do | |
252 | + // XMLPropStorage.StoredValue['CGMatrix.Checked'+IntToStr(i)] := BoolToStr(CGMatrix.Checked[i]); | |
253 | +end; | |
254 | + | |
255 | +procedure TFormDesigner.MenuItemExitClick(Sender: TObject); | |
256 | +begin | |
257 | + Close; | |
258 | +end; | |
259 | + | |
260 | +procedure TFormDesigner.FormCreate(Sender: TObject); | |
261 | +//var | |
262 | +// LFileName: String; | |
263 | +begin | |
264 | + //LFileName := 'default.txt'; | |
265 | + //IPSExperiment.IniFileName := LFileName; | |
266 | + //IPSExperiment.IniSection := SEC_EXPERIMENT; | |
267 | + //IPSConditions.IniFileName := LFileName; | |
268 | + //IPSConditions.IniSection := SEC_CONDITION; | |
269 | + //IPSPlayers.IniFileName := LFileName; | |
270 | + //IPSPlayers.IniSection := SEC_PLAYER; | |
271 | + RGPointsClick(RGPoints); | |
272 | + RGEndCriteriaStyleClick(RGEndCriteriaStyle); | |
273 | + FExperiment := TCIniFile.Create('default.txt'); | |
274 | + //FExperiment.FileName; | |
275 | +end; | |
276 | + | |
277 | +procedure TFormDesigner.FormDestroy(Sender: TObject); | |
278 | +begin | |
279 | + FExperiment.Destroy; | |
280 | +end; | |
281 | + | |
282 | +procedure TFormDesigner.CheckBoxShouldAskQuestionChange(Sender: TObject); | |
283 | +begin | |
284 | + if TCheckBox(Sender).Checked then | |
285 | + TCheckBox(Sender).Caption := 'Sim' | |
286 | + else | |
287 | + TCheckBox(Sender).Caption := 'Não'; | |
288 | + | |
289 | + EditQuestion.Visible := CheckBoxShouldAskQuestion.Checked; | |
290 | + CGQuestion.Visible := CheckBoxShouldAskQuestion.Checked; | |
291 | +end; | |
292 | + | |
293 | +procedure TFormDesigner.CheckBoxBroadcastChange(Sender: TObject); | |
294 | +begin | |
295 | + if TCheckBox(Sender).Checked then | |
296 | + TCheckBox(Sender).Caption := 'a todos' | |
297 | + else | |
298 | + TCheckBox(Sender).Caption := 'ao participante'; | |
299 | + | |
300 | +end; | |
301 | + | |
302 | +procedure TFormDesigner.CheckBoxIsMetaChange(Sender: TObject); | |
303 | +var | |
304 | + i: Integer; | |
305 | +begin | |
306 | + if TCheckBox(Sender).Checked then | |
307 | + begin | |
308 | + ComboBoxRows.Items.Clear; | |
309 | + ComboBoxRows.Items.Append('PARES'); | |
310 | + ComboBoxRows.Items.Append('IMPARES'); | |
311 | + | |
312 | + ComboBoxColors.Items.Clear; | |
313 | + ComboBoxColors.Items.Append('CORES IGUAIS'); | |
314 | + ComboBoxColors.Items.Append('CORES DIFERENTES'); | |
315 | + ComboBoxColors.Items.Append('TUDO EXCETO CORES IGUAIS'); | |
316 | + ComboBoxColors.Items.Append('TUDO EXCETO CORES DIFERENTES'); | |
317 | + end | |
318 | + else | |
319 | + begin | |
320 | + ComboBoxRows.Items.Clear; | |
321 | + for i:=0 to 9 do | |
322 | + ComboBoxRows.Items.Append(IntToStr(i+1)); | |
323 | + | |
324 | + ComboBoxRows.Items.Append('PAR'); | |
325 | + ComboBoxRows.Items.Append('IMPAR'); | |
326 | + | |
327 | + ComboBoxColors.Items.Clear; | |
328 | + ComboBoxColors.Items.Append('AMARELO'); | |
329 | + ComboBoxColors.Items.Append('VERMELHO'); | |
330 | + ComboBoxColors.Items.Append('ROXO'); | |
331 | + ComboBoxColors.Items.Append('AZUL'); | |
332 | + ComboBoxColors.Items.Append('VERDE'); | |
333 | + end | |
334 | +end; | |
335 | + | |
336 | +end. | |
337 | + | ... | ... |
experiment_designer/lib/x86_64-linux/experiment_designer.compiled
0 → 100644
... | ... | @@ -0,0 +1,5 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<CONFIG> | |
3 | + <Compiler Value="/usr/bin/fpc" Date="1449313866"/> | |
4 | + <Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fi/home/rafael/git/stimulus_control/tests/lacs-matrix/experiment_designer/lib/x86_64-linux -Fl/opt/gnome/lib -Fu/home/rafael/git/stimulus_control/tests/lacs-matrix/units -Fu/usr/share/lazarus/1.6.2/lcl/units/x86_64-linux/gtk2 -Fu/usr/share/lazarus/1.6.2/lcl/units/x86_64-linux -Fu/usr/share/lazarus/1.6.2/components/lazutils/lib/x86_64-linux -Fu/usr/share/lazarus/1.6.2/packager/units/x86_64-linux -Fu/home/rafael/git/stimulus_control/tests/lacs-matrix/experiment_designer/ -FU/home/rafael/git/stimulus_control/tests/lacs-matrix/experiment_designer/lib/x86_64-linux/ -dLCL -dLCLgtk2 experiment_designer.lpr"/> | |
5 | +</CONFIG> | ... | ... |