home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 53 / IOPROG_53.ISO / soft / c++ / xceedftp.exe / Samples / Delphi / Console / events.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2000-10-05  |  1.6 KB  |  42 lines

  1. unit events;
  2. {------------------------------------------------------------------------------}
  3. { Console sample application using the Xceed FTP Library v1.0                  }
  4. { For Delphi 4 and 5                                                           }
  5. { Copyright (c) 1998-2000 Xceed Software Inc.                                  }
  6. {------------------------------------------------------------------------------}
  7.  
  8. interface
  9.  
  10. uses
  11.   SysUtils, OleCtrls, Dialogs, XceedFtpLib_TLB;
  12.   
  13. type
  14.   TEventHandler = class( TObject )
  15.     procedure ListingFolderItem(Sender : TObject;
  16.                                 const sName: WideString;
  17.                                 dtDate: TDateTime;
  18.                                 lFileSize: Integer;
  19.                                 eItemType: EXFFolderItemType;
  20.                                 const sUserData: WideString);
  21.   end;
  22.  
  23. implementation
  24.  
  25. procedure TEventHandler.ListingFolderItem(Sender : TObject;
  26.                                           const sName: WideString;
  27.                                           dtDate: TDateTime;
  28.                                           lFileSize: Integer;
  29.                                           eItemType: EXFFolderItemType;
  30.                                           const sUserData: WideString);
  31. begin
  32.   { Note that Sender is the XceedFtp instance that triggered this event }
  33.   case eItemType of
  34.     fitFile   : WriteLn( '[FILE] ' + AnsiString( sName ) );
  35.     fitFolder : WriteLn( '[DIR]  ' + AnsiString( sName ) );
  36.     fitLink   : WriteLn( '[LINK] ' + AnsiString( sName ) );
  37.   end;
  38. end;
  39.  
  40. end.
  41.  
  42.