| 60 |
|
FOnNewFileSelected: TNewFileSelectedEvent; |
| 61 |
|
FAllowedExts: String; |
| 62 |
|
FAllowMultiSelect: Boolean; |
| 63 |
+ |
FSelectedFile: TFileInfo; |
| 64 |
|
procedure SetAllowedExts(exts: String); |
| 65 |
|
procedure SetMultiSelect(allow: Boolean); |
| 66 |
|
public |
| 70 |
|
property OnNewFileSelected: TNewFileSelectedEvent read FOnNewFileSelected write FOnNewFileSelected; |
| 71 |
|
property AllowedExts: String read FAllowedExts write SetAllowedExts; |
| 72 |
|
property AllowMultiSelect: Boolean read FAllowMultiSelect write SetMultiSelect; |
| 73 |
+ |
property SelectedFile: TFileInfo read FSelectedFile; |
| 74 |
|
end; |
| 75 |
|
|
| 76 |
|
var |
| 204 |
|
begin |
| 205 |
|
inherited; |
| 206 |
|
RecreateList; |
| 207 |
+ |
FSelectedFile.ID := -1; |
| 208 |
+ |
FSelectedFile.FileName := ''; |
| 209 |
+ |
FSelectedFile.FileNameHex := ''; |
| 210 |
|
if Length(ToolList) > 0 then |
| 211 |
|
begin |
| 212 |
|
for i := 0 to High(ToolList) do |
| 271 |
|
begin |
| 272 |
|
fileid := OniDataConnection.ExtractFileID( |
| 273 |
|
filelist.Items.Strings[filelist.ItemIndex]); |
| 274 |
+ |
FSelectedFile := OniDataConnection.GetFileInfo(fileid); |
| 275 |
|
if Assigned(FOnNewFileSelected) then |
| 276 |
< |
FOnNewFileSelected(OniDataConnection.GetFileInfo(fileid)); |
| 276 |
> |
FOnNewFileSelected(FSelectedFile); |
| 277 |
|
end; |
| 278 |
|
end; |
| 279 |
|
|