Changeset 83 for oup/current/Tools


Ignore:
Timestamp:
Jan 14, 2007, 2:30:12 AM (18 years ago)
Author:
alloc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Tools/Template.pas

    r70 r83  
    6161    FAllowedExts: String;
    6262    FAllowMultiSelect: Boolean;
     63    FSelectedFile: TFileInfo;
    6364    procedure SetAllowedExts(exts: String);
    6465    procedure SetMultiSelect(allow: Boolean);
     
    7071    property AllowedExts: String read FAllowedExts write SetAllowedExts;
    7172    property AllowMultiSelect: Boolean read FAllowMultiSelect write SetMultiSelect;
     73    property SelectedFile: TFileInfo read FSelectedFile;
    7274  end;
    7375
     
    203205  inherited;
    204206  RecreateList;
     207  FSelectedFile.ID := -1;
     208  FSelectedFile.FileName := '';
     209  FSelectedFile.FileNameHex := '';
    205210  if Length(ToolList) > 0 then
    206211  begin
     
    267272    fileid := OniDataConnection.ExtractFileID(
    268273          filelist.Items.Strings[filelist.ItemIndex]);
     274    FSelectedFile := OniDataConnection.GetFileInfo(fileid);
    269275    if Assigned(FOnNewFileSelected) then
    270       FOnNewFileSelected(OniDataConnection.GetFileInfo(fileid));
     276      FOnNewFileSelected(FSelectedFile);
    271277  end;
    272278end;
Note: See TracChangeset for help on using the changeset viewer.