|
Last change
on this file was 149, checked in by chronos, 19 months ago |
- Modified: Use TFormEx class from Common package.
|
|
File size:
782 bytes
|
| Line | |
|---|
| 1 | unit FormMessages;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, FormEx,
|
|---|
| 7 | ComCtrls;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 10 |
|
|---|
| 11 | { TFormMessages }
|
|---|
| 12 |
|
|---|
| 13 | TFormMessages = class(TFormEx)
|
|---|
| 14 | ListView1: TListView;
|
|---|
| 15 | procedure ListView1Data(Sender: TObject; Item: TListItem);
|
|---|
| 16 | public
|
|---|
| 17 | procedure Reload;
|
|---|
| 18 | end;
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | implementation
|
|---|
| 22 |
|
|---|
| 23 | {$R *.lfm}
|
|---|
| 24 |
|
|---|
| 25 | uses
|
|---|
| 26 | Core, Target;
|
|---|
| 27 |
|
|---|
| 28 | { TFormMessages }
|
|---|
| 29 |
|
|---|
| 30 | procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem);
|
|---|
| 31 | begin
|
|---|
| 32 | with Core.Core do
|
|---|
| 33 | if (Item.Index >= 0) and (Item.Index < Messages.Count) then
|
|---|
| 34 | with Messages[Item.Index] do begin
|
|---|
| 35 | Item.Caption := Text;
|
|---|
| 36 | Item.Data := Messages[Item.Index];
|
|---|
| 37 | end;
|
|---|
| 38 | end;
|
|---|
| 39 |
|
|---|
| 40 | procedure TFormMessages.Reload;
|
|---|
| 41 | begin
|
|---|
| 42 | ListView1.Items.Count := Core.Core.Messages.Count;
|
|---|
| 43 | ListView1.Refresh;
|
|---|
| 44 | end;
|
|---|
| 45 |
|
|---|
| 46 | end.
|
|---|
| 47 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.