You've already forked lazarus-ccr
Lazstats: Complete help text for ItemBankingUnit. Some refactoring of item banking units.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7458 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Binary file not shown.
Binary file not shown.
@ -35,7 +35,8 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
TabOrder = 0
|
||||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object BankNameLabel: TLabel
|
||||
AnchorSideTop.Control = BankNameText
|
||||
@ -61,7 +62,8 @@ object ItemBankFrm: TItemBankFrm
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
TabOrder = 1
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object NMCItemsLabel: TLabel
|
||||
AnchorSideTop.Control = NMCItemsText
|
||||
@ -85,6 +87,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object TFItemsLabel: TLabel
|
||||
@ -110,6 +113,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object NMatchLabel: TLabel
|
||||
@ -135,6 +139,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
ReadOnly = True
|
||||
TabOrder = 4
|
||||
end
|
||||
object NEssayLabel: TLabel
|
||||
@ -160,6 +165,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
end
|
||||
object FilesLabel: TLabel
|
||||
@ -194,7 +200,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
BorderSpacing.Bottom = 8
|
||||
Directory = 'C:\Users\wgmiller\Desktop'
|
||||
ItemHeight = 0
|
||||
TabOrder = 6
|
||||
TabOrder = 10
|
||||
end
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -209,23 +215,23 @@ object ItemBankFrm: TItemBankFrm
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'Click to Change Directory to Options Default Directory'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 7
|
||||
TabOrder = 8
|
||||
end
|
||||
object DirectoryEdit1: TEdit
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideRight.Control = SpeedButton1
|
||||
Left = 8
|
||||
Height = 23
|
||||
Top = 265
|
||||
Width = 371
|
||||
Width = 344
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 8
|
||||
TabOrder = 8
|
||||
BorderSpacing.Right = 4
|
||||
OnChange = DirectoryEdit1Change
|
||||
TabOrder = 9
|
||||
Text = 'DirectoryEdit1'
|
||||
end
|
||||
object Label2: TLabel
|
||||
@ -251,7 +257,8 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
TabOrder = 9
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
end
|
||||
object Label3: TLabel
|
||||
AnchorSideTop.Control = NSpecifiedEdit
|
||||
@ -276,26 +283,47 @@ object ItemBankFrm: TItemBankFrm
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
TabOrder = 10
|
||||
ReadOnly = True
|
||||
TabOrder = 7
|
||||
Text = 'NSpecifiedEdit'
|
||||
end
|
||||
object SpeedButton1: TSpeedButton
|
||||
AnchorSideTop.Control = DirectoryEdit1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 356
|
||||
Height = 22
|
||||
Top = 265
|
||||
Width = 23
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Caption = '...'
|
||||
OnClick = SpeedButton1Click
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
left = 272
|
||||
top = 72
|
||||
object MenuItem1: TMenuItem
|
||||
Caption = 'Item Bank'
|
||||
object OpenItemBank: TMenuItem
|
||||
Caption = 'Open an existing item bank'
|
||||
OnClick = OpenItemBankClick
|
||||
end
|
||||
object NewItemBank: TMenuItem
|
||||
Caption = 'Create a new item bank'
|
||||
OnClick = NewItemBankClick
|
||||
end
|
||||
object MenuItem3: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object OpenItemBank: TMenuItem
|
||||
Caption = 'Open an existing item bank'
|
||||
OnClick = OpenItemBankClick
|
||||
end
|
||||
object SaveBankMenu: TMenuItem
|
||||
Caption = 'Save Current Item Bank'
|
||||
Caption = 'Save current item bank'
|
||||
OnClick = SaveBankMenuClick
|
||||
end
|
||||
object MenuItem2: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object ExitThis: TMenuItem
|
||||
Caption = 'Exit this procedure'
|
||||
end
|
||||
@ -352,7 +380,7 @@ object ItemBankFrm: TItemBankFrm
|
||||
top = 128
|
||||
end
|
||||
object SelDir: TSelectDirectoryDialog
|
||||
left = 208
|
||||
top = 184
|
||||
left = 216
|
||||
top = 368
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,5 @@
|
||||
// No test file found.
|
||||
// Unit (and related units) not tested...
|
||||
// Test file: "testitembank.bnk"
|
||||
// Not fully tested
|
||||
|
||||
unit ItemBankingUnit;
|
||||
|
||||
@ -9,7 +9,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
Menus, StdCtrls, FileCtrl,
|
||||
Menus, StdCtrls, FileCtrl, Buttons,
|
||||
Globals, OutputUnit, ItemCodesUnit, TFItemUnit, EssayItemUnit,
|
||||
MCItemUnit, MatchItemUnit, TestSpecsUnit;
|
||||
|
||||
@ -107,8 +107,11 @@ type
|
||||
BankNameText: TEdit;
|
||||
Button1: TButton;
|
||||
DirectoryEdit1: TEdit;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
NSpecifiedEdit: TEdit;
|
||||
Label3: TLabel;
|
||||
SpeedButton1: TSpeedButton;
|
||||
TestSpecifiedEdit: TEdit;
|
||||
FileListBox1: TFileListBox;
|
||||
FilesLabel: TLabel;
|
||||
@ -145,6 +148,7 @@ type
|
||||
OpenItemBank: TMenuItem;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure CreateCodesClick(Sender: TObject);
|
||||
procedure DirectoryEdit1Change(Sender: TObject);
|
||||
procedure EssayItemsClick(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
@ -157,6 +161,7 @@ type
|
||||
procedure PrintTestClick(Sender: TObject);
|
||||
procedure SaveBankMenuClick(Sender: TObject);
|
||||
procedure ShowCodesClick(Sender: TObject);
|
||||
procedure SpeedButton1Click(Sender: TObject);
|
||||
procedure TestSpecsClick(Sender: TObject);
|
||||
procedure TFItemsClick(Sender: TObject);
|
||||
private
|
||||
@ -170,7 +175,6 @@ type
|
||||
EssayInfo : array[1..100] of EssayItem;
|
||||
TestContents : array[1..100] of testspec;
|
||||
BankInfo : Bank;
|
||||
// FileName : string;
|
||||
|
||||
end;
|
||||
|
||||
@ -403,10 +407,10 @@ begin
|
||||
lReport.Add(TFItemInfo[tfitem].ItemStem);
|
||||
lReport.Add('A. TRUE');
|
||||
lReport.Add('B. False');
|
||||
end;
|
||||
end;
|
||||
lReport.Add('');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if nessay > 0 then
|
||||
begin
|
||||
lReport.Add('');
|
||||
@ -419,12 +423,13 @@ begin
|
||||
lReport.Add('Item %d', [itemno]);
|
||||
essayitem := TestContents[i].ItemNumber;
|
||||
lReport.Add(EssayInfo[essayitem].ItemStem);
|
||||
end;
|
||||
end;
|
||||
lReport.Add('');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if nmatch > 0 then
|
||||
begin
|
||||
lReport.Add('');
|
||||
lReport.Add('MATCHING ITEMS:');
|
||||
for i := 1 to BankInfo.TestItems do
|
||||
begin
|
||||
@ -482,10 +487,10 @@ begin
|
||||
end;
|
||||
lReport.Add(outline);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
lReport.Add('');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
DisplayReport(lReport);
|
||||
finally
|
||||
@ -661,6 +666,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TItemBankFrm.SpeedButton1Click(Sender: TObject);
|
||||
begin
|
||||
SelDir.InitialDir := FileListbox1.Directory;
|
||||
if SelDir.Execute then begin
|
||||
FileListBox1.Directory := SelDir.FileName;
|
||||
DirectoryEdit1.Text := SelDir.FileName;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TItemBankFrm.TestSpecsClick(Sender: TObject);
|
||||
begin
|
||||
if TestSpecsForm = nil then
|
||||
@ -695,12 +709,15 @@ var
|
||||
response: TModalResult;
|
||||
begin
|
||||
CanClose := true;
|
||||
if BankNameText.Text <> '' then
|
||||
begin
|
||||
response := MessageDlg('Save current item bank?', mtConfirmation, [mbYes, mbNo, mbCancel], 0);
|
||||
case response of
|
||||
mrYes: SaveBankMenuClick(self);
|
||||
mrNo: ;
|
||||
mrCancel: CanClose := false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TItemBankFrm.FormCreate(Sender: TObject);
|
||||
@ -744,6 +761,7 @@ begin
|
||||
lReport.Add('Major code: %d', [TestContents[i].MajorCode]);
|
||||
lReport.Add('Minor code: %d', [TestContents[i].MinorCode]);
|
||||
lReport.Add('Item type: %s', [TestContents[i].ItemType]);
|
||||
lReport.Add('');
|
||||
end;
|
||||
DisplayReport(lReport);
|
||||
finally
|
||||
@ -773,6 +791,12 @@ begin
|
||||
CodesForm.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TItemBankFrm.DirectoryEdit1Change(Sender: TObject);
|
||||
begin
|
||||
if DirectoryExists(DirectoryEdit1.Text) then
|
||||
FileListbox1.Directory := DirectoryEdit1.Text;
|
||||
end;
|
||||
|
||||
procedure TItemBankFrm.Button1Click(Sender: TObject);
|
||||
begin
|
||||
DirectoryEdit1.Text := Options.DefaultPath;
|
||||
|
@ -121,9 +121,10 @@ var
|
||||
JPEG: TJPEGImage;
|
||||
nochoices: integer;
|
||||
begin
|
||||
response := InputBox('Save current item?','Save','Y');
|
||||
if response = 'Y' then ItemSaveBtnClick(self);
|
||||
Image1.Canvas.Clear;
|
||||
if MessageDlg('Save current item?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
ItemSaveBtnClick(self);
|
||||
|
||||
Image1.Picture.Clear;
|
||||
ChoiceAEdit.Text := '';
|
||||
ChoiceBEdit.Text := '';
|
||||
ChoiceCEdit.Text := '';
|
||||
@ -314,9 +315,10 @@ var
|
||||
nochoices: integer;
|
||||
response: string;
|
||||
begin
|
||||
response := InputBox('Save current item?','Save','Y');
|
||||
if response = 'Y' then ItemSaveBtnClick(self);
|
||||
Image1.Canvas.Clear;
|
||||
if MessageDlg('Save current item?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
ItemSaveBtnClick(self);
|
||||
|
||||
Image1.Picture.Clear;
|
||||
itemno := StrToInt(ItemNoEdit.Text) + 1;
|
||||
count := ItemBankFrm.BankInfo.NMCItems;
|
||||
if count <= itemno then
|
||||
@ -358,8 +360,9 @@ var
|
||||
currentno: integer;
|
||||
response: string;
|
||||
begin
|
||||
response := InputBox('Save current item?','Save','Y');
|
||||
if response = 'Y' then ItemSaveBtnClick(self);
|
||||
if MessageDlg('Save current item?', mtInformation, [mbYes, mbNo], 0) = mrYes then
|
||||
ItemSaveBtnClick(self);
|
||||
|
||||
currentno := ItemBankFrm.BankInfo.NMCItems + 1;
|
||||
ItemNoEdit.Text := IntToStr(currentno);
|
||||
currentno := StrToInt(MinorCodeEdit.Text);
|
||||
|
@ -1,20 +1,19 @@
|
||||
object TestSpecsForm: TTestSpecsForm
|
||||
Left = 496
|
||||
Left = 755
|
||||
Height = 574
|
||||
Top = 192
|
||||
Width = 965
|
||||
Top = 340
|
||||
Width = 943
|
||||
Caption = 'Test Specification'
|
||||
ClientHeight = 574
|
||||
ClientWidth = 965
|
||||
ClientWidth = 943
|
||||
OnShow = FormShow
|
||||
LCLVersion = '2.1.0.0'
|
||||
object ReturnBtn: TButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 896
|
||||
Left = 874
|
||||
Height = 25
|
||||
Top = 541
|
||||
Width = 61
|
||||
@ -45,7 +44,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Left = 146
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 393
|
||||
Width = 788
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
TabOrder = 1
|
||||
@ -53,7 +52,6 @@ object TestSpecsForm: TTestSpecsForm
|
||||
end
|
||||
object SelectChoiceBox: TCheckGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Panel1
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
@ -89,7 +87,6 @@ object TestSpecsForm: TTestSpecsForm
|
||||
}
|
||||
end
|
||||
object TFItemNoLabel: TLabel
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = ItemNoEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 228
|
||||
@ -168,45 +165,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
TabOrder = 5
|
||||
Text = '0'
|
||||
end
|
||||
object Panel1: TPanel
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ItemNoEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ReturnBtn
|
||||
Left = 228
|
||||
Height = 463
|
||||
Top = 70
|
||||
Width = 729
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
BevelOuter = bvNone
|
||||
BorderStyle = bsSingle
|
||||
ClientHeight = 459
|
||||
ClientWidth = 725
|
||||
TabOrder = 6
|
||||
OnPaint = Panel1Paint
|
||||
object Memo: TMemo
|
||||
Left = 4
|
||||
Height = 451
|
||||
Top = 4
|
||||
Width = 717
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object SelectItemBtn: TButton
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
@ -219,7 +178,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = 'Select this item'
|
||||
OnClick = SelectItemBtnClick
|
||||
TabOrder = 7
|
||||
TabOrder = 6
|
||||
end
|
||||
object SkipBtn: TButton
|
||||
AnchorSideLeft.Control = SelectItemBtn
|
||||
@ -237,14 +196,16 @@ object TestSpecsForm: TTestSpecsForm
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = 'Skip this item'
|
||||
OnClick = SkipBtnClick
|
||||
TabOrder = 8
|
||||
TabOrder = 7
|
||||
end
|
||||
object Label7: TLabel
|
||||
AnchorSideLeft.Control = MinorCodeEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SelectedEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 689
|
||||
Height = 15
|
||||
Top = 45
|
||||
Top = 43
|
||||
Width = 54
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'Item Type:'
|
||||
@ -259,7 +220,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Top = 39
|
||||
Width = 183
|
||||
BorderSpacing.Left = 8
|
||||
TabOrder = 9
|
||||
TabOrder = 8
|
||||
Text = 'SelectedEdit'
|
||||
end
|
||||
object Label8: TLabel
|
||||
@ -290,7 +251,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 16
|
||||
TabOrder = 10
|
||||
TabOrder = 9
|
||||
Text = 'NoItemsEdit'
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
@ -314,7 +275,7 @@ object TestSpecsForm: TTestSpecsForm
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 116
|
||||
ClientWidth = 200
|
||||
TabOrder = 11
|
||||
TabOrder = 10
|
||||
object Label4: TLabel
|
||||
Left = 14
|
||||
Height = 23
|
||||
@ -328,6 +289,8 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
Text = 'Edit1'
|
||||
end
|
||||
@ -344,6 +307,8 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Height = 23
|
||||
Top = 33
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
Text = 'TFNoEdit'
|
||||
end
|
||||
@ -360,6 +325,8 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Height = 23
|
||||
Top = 60
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
Text = 'Edit1'
|
||||
end
|
||||
@ -376,10 +343,37 @@ object TestSpecsForm: TTestSpecsForm
|
||||
Height = 23
|
||||
Top = 87
|
||||
Width = 80
|
||||
Alignment = taRightJustify
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
Text = 'Edit1'
|
||||
end
|
||||
end
|
||||
object Memo: TMemo
|
||||
AnchorSideLeft.Control = GroupBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ItemNoEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ReturnBtn
|
||||
Left = 228
|
||||
Height = 463
|
||||
Top = 70
|
||||
Width = 707
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
BorderSpacing.Bottom = 8
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 11
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
left = 256
|
||||
top = 160
|
||||
|
@ -26,7 +26,6 @@ type
|
||||
MajorCodeEdit: TEdit;
|
||||
MinorCodeEdit: TEdit;
|
||||
MinorCodeLabel: TLabel;
|
||||
Panel1: TPanel;
|
||||
TFItemNoLabel: TLabel;
|
||||
TFNoEdit: TEdit;
|
||||
EssayNoEdit: TEdit;
|
||||
@ -43,7 +42,6 @@ type
|
||||
ReturnBtn: TButton;
|
||||
SaveDialog1: TSaveDialog;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Panel1Paint(Sender: TObject);
|
||||
procedure ReturnBtnClick(Sender: TObject);
|
||||
procedure SelectItemBtnClick(Sender: TObject);
|
||||
procedure SelectChoiceBoxItemClick(Sender: TObject; Index: integer);
|
||||
@ -92,21 +90,10 @@ begin
|
||||
NoItemsEdit.Text := '0';
|
||||
end;
|
||||
|
||||
procedure TTestSpecsForm.Panel1Paint(Sender: TObject);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TTestSpecsForm.SelectChoiceBoxItemClick(Sender: TObject; Index: integer);
|
||||
var
|
||||
//nomc, notf, nomatch, noessay, i : integer;
|
||||
//response: string;
|
||||
i, response: Integer;
|
||||
begin
|
||||
//nomc := StrToInt(MCNoEdit.Text);
|
||||
//notf := StrToInt(TFNoEdit.Text);
|
||||
//nomatch := StrToInt(MatchNoEdit.Text);
|
||||
//noessay := StrToInt(EssayNoEdit.Text);
|
||||
case Index of
|
||||
0 : begin // Select multiple choice items
|
||||
SelectedEdit.Text := 'MC';
|
||||
@ -115,8 +102,6 @@ begin
|
||||
ShowMCItem(i);
|
||||
response := MessageDlg('Add item to test?', mtConfirmation, [mbYes, mbNo], 0);
|
||||
if response = mrYes then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
//response := InputBox('Add item to test','Add?','Y');
|
||||
//if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
end;
|
||||
end;
|
||||
1 : begin // Select true or false items
|
||||
@ -126,10 +111,6 @@ begin
|
||||
ShowTFItem(i);
|
||||
response := MessageDlg('Add item to test?', mtConfirmation, [mbYes, mbNo], 0);
|
||||
if response = mrYes then SelectItemBtnclick(self) else SkipBtnClick(self);
|
||||
{
|
||||
response := InputBox('Add item to test','Add?','Y');
|
||||
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
}
|
||||
end;
|
||||
end;
|
||||
2 : begin // Select Essay items
|
||||
@ -139,10 +120,6 @@ begin
|
||||
ShowEssayItem(i);
|
||||
response := MessageDlg('Add item to test?', mtConfirmation, [mbYes, mbNo], 0);
|
||||
if response = mrYes then selectItemBtnClick(self) else SkipBtnClick(self);
|
||||
{
|
||||
response := InputBox('Add item to test','Add?','Y');
|
||||
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
}
|
||||
end;
|
||||
end;
|
||||
3 : begin // Select matching items
|
||||
@ -152,10 +129,6 @@ begin
|
||||
ShowMatchItem(i);
|
||||
response := MessageDlg('Add item to test?', mtConfirmation, [mbYes, mbNo], 0);
|
||||
if response = mrYes then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
{
|
||||
response := InputBox('Add item to test','Add?','Y');
|
||||
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
|
||||
}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -91,7 +91,7 @@ var
|
||||
itemno: integer;
|
||||
JPEG: TJPEGImage;
|
||||
begin
|
||||
response := InputBox('Code Number:','Number:','1');
|
||||
response := InputBox('Code Number:', 'Number:','1');
|
||||
itemno := StrToInt(response);
|
||||
if itemno <= ItemBankFrm.BankInfo.NTFItems then
|
||||
begin
|
||||
@ -261,7 +261,8 @@ begin
|
||||
ItemStemEdit.Text := '';
|
||||
AnswerEdit.Text := '';
|
||||
jpegnameEdit.Text := 'none';
|
||||
Image1.Canvas.Clear;
|
||||
Image1.Picture.Clear;
|
||||
// Image1.Canvas.Clear;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Reference in New Issue
Block a user