|
Last change
on this file was 16, checked in by chronos, 10 years ago |
- Added: Preparation for filtering of non visible nodes.
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | unit UFormList;
|
|---|
| 2 |
|
|---|
| 3 | {$mode delphi}
|
|---|
| 4 |
|
|---|
| 5 | interface
|
|---|
| 6 |
|
|---|
| 7 | uses
|
|---|
| 8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
|---|
| 9 |
|
|---|
| 10 | type
|
|---|
| 11 |
|
|---|
| 12 | { TFormList }
|
|---|
| 13 |
|
|---|
| 14 | TFormList = class(TForm)
|
|---|
| 15 | CheckBoxAccessible: TCheckBox;
|
|---|
| 16 | Label1: TLabel;
|
|---|
| 17 | Memo1: TMemo;
|
|---|
| 18 | procedure FormShow(Sender: TObject);
|
|---|
| 19 | private
|
|---|
| 20 | { private declarations }
|
|---|
| 21 | public
|
|---|
| 22 | { public declarations }
|
|---|
| 23 | end;
|
|---|
| 24 |
|
|---|
| 25 | var
|
|---|
| 26 | FormList: TFormList;
|
|---|
| 27 |
|
|---|
| 28 | implementation
|
|---|
| 29 |
|
|---|
| 30 | uses
|
|---|
| 31 | UFormMain, UKConfig;
|
|---|
| 32 |
|
|---|
| 33 | {$R *.lfm}
|
|---|
| 34 |
|
|---|
| 35 | { TFormList }
|
|---|
| 36 |
|
|---|
| 37 | procedure TFormList.FormShow(Sender: TObject);
|
|---|
| 38 | var
|
|---|
| 39 | List: TStringList;
|
|---|
| 40 | I: Integer;
|
|---|
| 41 | begin
|
|---|
| 42 | try
|
|---|
| 43 | List := TStringList.Create;
|
|---|
| 44 | Memo1.Lines.BeginUpdate;
|
|---|
| 45 | Memo1.Lines.Clear;
|
|---|
| 46 | FormMain.Config.TopNode.SaveToList(List);
|
|---|
| 47 | if CheckBoxAccessible.Checked then
|
|---|
| 48 | for I := List.Count - 1 to 0 do
|
|---|
| 49 | if not TMenuNode(List.Objects[I]).CanBeVisible then
|
|---|
| 50 | List.Delete(I);
|
|---|
| 51 | List.Sort;
|
|---|
| 52 | Memo1.Lines.Assign(List);
|
|---|
| 53 | Label1.Caption := IntToStr(Memo1.Lines.Count);
|
|---|
| 54 | finally
|
|---|
| 55 | List.Free;
|
|---|
| 56 | Memo1.Lines.EndUpdate;
|
|---|
| 57 | end;
|
|---|
| 58 | end;
|
|---|
| 59 |
|
|---|
| 60 | end.
|
|---|
| 61 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.