Commit 0a855478782c69f11323131bec0e26756fc18661
1 parent
79d1aa14
Exists in
master
fix list of current contingency and condition
Showing
2 changed files
with
29 additions
and
22 deletions
Show diff stats
experiment_designer/form_main.lfm
... | ... | @@ -3,12 +3,12 @@ object FormDesigner: TFormDesigner |
3 | 3 | Height = 635 |
4 | 4 | Top = 44 |
5 | 5 | Width = 656 |
6 | - HorzScrollBar.Page = 346 | |
7 | - VertScrollBar.Page = 616 | |
6 | + HorzScrollBar.Page = 387 | |
7 | + VertScrollBar.Page = 520 | |
8 | 8 | AutoScroll = True |
9 | 9 | Caption = 'Planejar Experimento' |
10 | 10 | ClientHeight = 616 |
11 | - ClientWidth = 646 | |
11 | + ClientWidth = 656 | |
12 | 12 | Menu = MainMenu1 |
13 | 13 | OnActivate = FormActivate |
14 | 14 | OnCreate = FormCreate |
... | ... | @@ -18,12 +18,12 @@ object FormDesigner: TFormDesigner |
18 | 18 | LCLVersion = '1.6.2.0' |
19 | 19 | object PageControl: TPageControl |
20 | 20 | Left = 0 |
21 | - Height = 744 | |
21 | + Height = 616 | |
22 | 22 | Top = 0 |
23 | - Width = 646 | |
24 | - ActivePage = TabSheetExperiment | |
23 | + Width = 656 | |
24 | + ActivePage = TabSheetContingencies | |
25 | 25 | Align = alClient |
26 | - TabIndex = 0 | |
26 | + TabIndex = 2 | |
27 | 27 | TabOrder = 0 |
28 | 28 | object TabSheetExperiment: TTabSheet |
29 | 29 | Caption = 'Experimento' |
... | ... | @@ -32,8 +32,8 @@ object FormDesigner: TFormDesigner |
32 | 32 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize |
33 | 33 | ChildSizing.Layout = cclLeftToRightThenTopToBottom |
34 | 34 | ChildSizing.ControlsPerLine = 1 |
35 | - ClientHeight = 711 | |
36 | - ClientWidth = 640 | |
35 | + ClientHeight = 583 | |
36 | + ClientWidth = 650 | |
37 | 37 | object LabelResearcherName: TLabel |
38 | 38 | Left = 0 |
39 | 39 | Height = 15 |
... | ... | @@ -237,8 +237,8 @@ object FormDesigner: TFormDesigner |
237 | 237 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize |
238 | 238 | ChildSizing.Layout = cclLeftToRightThenTopToBottom |
239 | 239 | ChildSizing.ControlsPerLine = 1 |
240 | - ClientHeight = 711 | |
241 | - ClientWidth = 640 | |
240 | + ClientHeight = 583 | |
241 | + ClientWidth = 650 | |
242 | 242 | object ComboCurrentCondition: TComboBox |
243 | 243 | Left = 0 |
244 | 244 | Height = 27 |
... | ... | @@ -571,8 +571,8 @@ object FormDesigner: TFormDesigner |
571 | 571 | ChildSizing.EnlargeHorizontal = crsHomogenousChildResize |
572 | 572 | ChildSizing.Layout = cclLeftToRightThenTopToBottom |
573 | 573 | ChildSizing.ControlsPerLine = 1 |
574 | - ClientHeight = 711 | |
575 | - ClientWidth = 640 | |
574 | + ClientHeight = 583 | |
575 | + ClientWidth = 650 | |
576 | 576 | Enabled = False |
577 | 577 | object RGContingencyType: TRadioGroup |
578 | 578 | Left = 0 | ... | ... |
experiment_designer/form_main.pas
... | ... | @@ -520,6 +520,8 @@ begin |
520 | 520 | Result += 'CÍRCULOS PREENCHIDOS,'; |
521 | 521 | if ChkCleanDots.Checked then |
522 | 522 | Result += 'CÍRCULOS VAZADOS,'; |
523 | + if ChkDotsCleanDots.Checked then | |
524 | + Result += 'CÍRCULOS AMBOS,'; | |
523 | 525 | end; |
524 | 526 | |
525 | 527 | function TFormDesigner.GetPromptQuestionStringFromCGQuestion: string; |
... | ... | @@ -562,6 +564,11 @@ begin |
562 | 564 | ChkCleanDots.Checked := True |
563 | 565 | else |
564 | 566 | ChkCleanDots.Checked := False; |
567 | + | |
568 | + if Pos('CÍRCULOS AMBOS', UpperCase(AMatrixType)) > 0 then | |
569 | + ChkDotsCleanDots.Checked := True | |
570 | + else | |
571 | + ChkDotsCleanDots.Checked := False; | |
565 | 572 | end; |
566 | 573 | |
567 | 574 | procedure TFormDesigner.SetCGQuestion(AQuestionStyle: string); |
... | ... | @@ -1295,7 +1302,7 @@ var |
1295 | 1302 | end; |
1296 | 1303 | Section.Clear; |
1297 | 1304 | ComboCurrentCondition.Items[i] := |
1298 | - SectionName + '|' + ExtractDelimited(2, ComboCurrentCondition.Items[i], ['|']); | |
1305 | + SectionName + '|' + ReadString(SectionName,KEY_COND_NAME,''); | |
1299 | 1306 | end; |
1300 | 1307 | Section.Free; |
1301 | 1308 | end; |
... | ... | @@ -1314,12 +1321,12 @@ begin |
1314 | 1321 | case ComboCurrentCondition.Items.Count of |
1315 | 1322 | 0: {do nothing}; |
1316 | 1323 | 1..MaxInt: |
1317 | - if i = 1 then | |
1324 | + if i = 0 then | |
1318 | 1325 | ComboCurrentCondition.ItemIndex := i |
1319 | 1326 | else |
1320 | 1327 | ComboCurrentCondition.ItemIndex := i -1; |
1321 | 1328 | end; |
1322 | - ListBoxContingencies.Items.Text := ComboCurrentCondition.Items.Text; | |
1329 | + ListBoxConditions.Items.Text := ComboCurrentCondition.Items.Text; | |
1323 | 1330 | TabSheetContingencies.Enabled := ComboCurrentCondition.Items.Count > 0; |
1324 | 1331 | end; |
1325 | 1332 | end; |
... | ... | @@ -1335,7 +1342,7 @@ var |
1335 | 1342 | Keys.BeginUpdate; |
1336 | 1343 | with FExperiment do |
1337 | 1344 | begin |
1338 | - Keys.Values[LC + KEY_NAME] := ReadString(LS,LC+KEY_NAME,''); | |
1345 | + Keys.Values[LC + KEY_CONT_NAME] := ReadString(LS,LC+KEY_CONT_NAME,''); | |
1339 | 1346 | Keys.Values[LC + KEY_CRITERIA] := ReadString(LS, LC + KEY_CRITERIA,''); |
1340 | 1347 | Keys.Values[LC + KEY_CONSEQUE] := ReadString(LS, LC + KEY_CONSEQUE,''); |
1341 | 1348 | Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND,''); |
... | ... | @@ -1344,7 +1351,7 @@ var |
1344 | 1351 | end; |
1345 | 1352 | Keys.EndUpdate; |
1346 | 1353 | end; |
1347 | - | |
1354 | + //todo:fix bug in here | |
1348 | 1355 | procedure Reorder(Index:integer); |
1349 | 1356 | var |
1350 | 1357 | i: integer; |
... | ... | @@ -1360,7 +1367,7 @@ var |
1360 | 1367 | KeyPrefix := ExtractDelimited(1, ComboCurrentContingency.Items[i], ['|']); |
1361 | 1368 | ReadContingencyValuesInSection(SectionName,KeyPrefix, SectionKeys); |
1362 | 1369 | EraseContingency(SectionName,KeyPrefix); |
1363 | - KeyPrefix := ExtractFileNameWithoutExt(KeyPrefix) + '.' + IntToStr(i); | |
1370 | + KeyPrefix := ExtractFileNameWithoutExt(KeyPrefix) + '.' + IntToStr(i + 1); | |
1364 | 1371 | for Line in SectionKeys do |
1365 | 1372 | begin |
1366 | 1373 | KeyName := SectionKeys.ExtractName(Line); |
... | ... | @@ -1368,7 +1375,7 @@ var |
1368 | 1375 | end; |
1369 | 1376 | SectionKeys.Clear; |
1370 | 1377 | ComboCurrentContingency.Items[i] := |
1371 | - KeyPrefix + '|' + ExtractDelimited(2, ComboCurrentContingency.Items[i], ['|']); | |
1378 | + KeyPrefix + '|' + ReadString(SectionName,KeyPrefix+KEY_CONT_NAME,''); | |
1372 | 1379 | end; |
1373 | 1380 | end; |
1374 | 1381 | SectionKeys.Free; |
... | ... | @@ -1381,8 +1388,8 @@ begin |
1381 | 1388 | MustReorder := i < ComboCurrentContingency.Items.Count - 1; |
1382 | 1389 | LS := ExtractDelimited(1, ComboCurrentCondition.Text, ['|']); |
1383 | 1390 | LC := ExtractDelimited(1, ComboCurrentContingency.Text, ['|']); |
1384 | - ComboCurrentContingency.Items.Delete(i); | |
1385 | 1391 | EraseContingency(LS,LC); |
1392 | + ComboCurrentContingency.Items.Delete(i); | |
1386 | 1393 | |
1387 | 1394 | if MustReorder then |
1388 | 1395 | Reorder(i); |
... | ... | @@ -1390,7 +1397,7 @@ begin |
1390 | 1397 | case ComboCurrentContingency.Items.Count of |
1391 | 1398 | 0: {do nothing}; |
1392 | 1399 | 1..MaxInt: |
1393 | - if i = 1 then | |
1400 | + if i = 0 then | |
1394 | 1401 | ComboCurrentContingency.ItemIndex := i |
1395 | 1402 | else |
1396 | 1403 | ComboCurrentContingency.ItemIndex := i -1; | ... | ... |