1 | unit fOCMonograph;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
---|
7 | Dialogs, StdCtrls, ORFn, ORCtrls, rOrders, VA508AccessibilityManager, ExtCtrls;
|
---|
8 |
|
---|
9 | type
|
---|
10 | TfrmOCMonograph = class(TForm)
|
---|
11 | monoCmbLst: TComboBox;
|
---|
12 | monoMemo: TCaptionMemo;
|
---|
13 | cmdOK: TButton;
|
---|
14 | VA508StaticText1: TVA508StaticText;
|
---|
15 | VA508StaticText2: TVA508StaticText;
|
---|
16 | VA508AccessibilityManager1: TVA508AccessibilityManager;
|
---|
17 | VA508ComponentAccessibility1: TVA508ComponentAccessibility;
|
---|
18 | procedure DisplayMonograph;
|
---|
19 | procedure monoCmbLstChange(Sender: TObject);
|
---|
20 | procedure cmdOKClick(Sender: TObject);
|
---|
21 | procedure VA508ComponentAccessibility1CaptionQuery(Sender: TObject;
|
---|
22 | var Text: string);
|
---|
23 | private
|
---|
24 | { Private declarations }
|
---|
25 | public
|
---|
26 | { Public declarations }
|
---|
27 | end;
|
---|
28 | var
|
---|
29 | mList: TStringList;
|
---|
30 | procedure ShowMonographs(monoList: TStringList);
|
---|
31 |
|
---|
32 | implementation
|
---|
33 |
|
---|
34 | {$R *.dfm}
|
---|
35 |
|
---|
36 | procedure ShowMonographs(monoList: TStringList);
|
---|
37 | var
|
---|
38 | i: Integer;
|
---|
39 | frmOCMonograph: TfrmOCMonograph;
|
---|
40 | begin
|
---|
41 | if monoList.Count > 0 then
|
---|
42 | begin
|
---|
43 | mList := monoList;
|
---|
44 | frmOCMonograph := TfrmOCMonograph.Create(Application);
|
---|
45 | try
|
---|
46 | for i := 0 to monoList.Count - 1 do
|
---|
47 | begin
|
---|
48 | frmOCMonograph.monoCmbLst.Items.Add(Piece(monoList[i], U, 2));
|
---|
49 | end;
|
---|
50 |
|
---|
51 | //frmOCMonograph.monoMemo.Clear;
|
---|
52 | frmOCMonograph.monoCmbLst.ItemIndex := 0;
|
---|
53 | frmOCMonograph.DisplayMonograph;
|
---|
54 | frmOCMonograph.ShowModal;
|
---|
55 | finally
|
---|
56 | frmOCMonograph.Free;
|
---|
57 | end;
|
---|
58 | end;
|
---|
59 | end;
|
---|
60 |
|
---|
61 | procedure TfrmOCMonograph.DisplayMonograph;
|
---|
62 | var
|
---|
63 | i: Integer;
|
---|
64 | x: Integer;
|
---|
65 | monograph: TStringList;
|
---|
66 | begin
|
---|
67 | x := -1;
|
---|
68 | monograph := TStringList.Create;
|
---|
69 | monoMemo.Clear;
|
---|
70 | for i := 0 to mList.Count - 1 do
|
---|
71 | begin
|
---|
72 | if Piece(mList[i],'^',2)=monoCmbLst.Items[monoCmbLst.ItemIndex] then x := StrtoInt(Piece(mList[i],'^',1));
|
---|
73 | end;
|
---|
74 | if (x > -1) then
|
---|
75 | begin
|
---|
76 | GetMonograph(monograph,x);
|
---|
77 | for i := 0 to monograph.Count - 1 do
|
---|
78 | begin
|
---|
79 | monoMemo.Text := monoMemo.Text + monograph[i] + CRLF;
|
---|
80 | end;
|
---|
81 |
|
---|
82 | end;
|
---|
83 |
|
---|
84 | end;
|
---|
85 |
|
---|
86 | procedure TfrmOCMonograph.cmdOKClick(Sender: TObject);
|
---|
87 | begin
|
---|
88 | self.Close;
|
---|
89 | end;
|
---|
90 |
|
---|
91 | procedure TfrmOCMonograph.monoCmbLstChange(Sender: TObject);
|
---|
92 | begin
|
---|
93 | DisplayMonograph;
|
---|
94 | end;
|
---|
95 |
|
---|
96 | procedure TfrmOCMonograph.VA508ComponentAccessibility1CaptionQuery(
|
---|
97 | Sender: TObject; var Text: string);
|
---|
98 | begin
|
---|
99 | Text := monoCmbLst.SelText;
|
---|
100 | end;
|
---|
101 |
|
---|
102 | end.
|
---|