Last change
on this file was 72, checked in by chronos, 8 years ago |
- Modified: Built with FPC 3.0.0. Fixed various compiler messages.
|
File size:
1002 bytes
|
Line | |
---|
1 | unit UFormMessages;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
---|
9 | ComCtrls;
|
---|
10 |
|
---|
11 | type
|
---|
12 |
|
---|
13 | { TFormMessages }
|
---|
14 |
|
---|
15 | TFormMessages = class(TForm)
|
---|
16 | ListView1: TListView;
|
---|
17 | procedure FormCreate(Sender: TObject);
|
---|
18 | procedure ListView1Data(Sender: TObject; Item: TListItem);
|
---|
19 | private
|
---|
20 | { private declarations }
|
---|
21 | public
|
---|
22 | procedure Reload;
|
---|
23 | end;
|
---|
24 |
|
---|
25 | var
|
---|
26 | FormMessages: TFormMessages;
|
---|
27 |
|
---|
28 | implementation
|
---|
29 |
|
---|
30 | {$R *.lfm}
|
---|
31 |
|
---|
32 | uses
|
---|
33 | UCore, UTarget;
|
---|
34 |
|
---|
35 | { TFormMessages }
|
---|
36 |
|
---|
37 | procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem);
|
---|
38 | begin
|
---|
39 | with Core.CurrentTarget do
|
---|
40 | if (Item.Index >= 0) and (Item.Index < Messages.Count) then
|
---|
41 | with TMessage(Messages[Item.Index]) do begin
|
---|
42 | Item.Caption := Text;
|
---|
43 | Item.Data := Messages[Item.Index];
|
---|
44 | end;
|
---|
45 | end;
|
---|
46 |
|
---|
47 | procedure TFormMessages.FormCreate(Sender: TObject);
|
---|
48 | begin
|
---|
49 |
|
---|
50 | end;
|
---|
51 |
|
---|
52 | procedure TFormMessages.Reload;
|
---|
53 | begin
|
---|
54 | ListView1.Items.Count := Core.CurrentTarget.Messages.Count;
|
---|
55 | ListView1.Refresh;
|
---|
56 | end;
|
---|
57 |
|
---|
58 | end.
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.