IdDayTime.pas 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. { $HDR$}
  2. {**********************************************************************}
  3. { Unit archived using Team Coherence }
  4. { Team Coherence is Copyright 2002 by Quality Software Components }
  5. { }
  6. { For further information / comments, visit our WEB site at }
  7. { http://www.TeamCoherence.com }
  8. {**********************************************************************}
  9. {}
  10. { $Log: 10121: IdDayTime.pas
  11. {
  12. { Rev 1.0 2002.11.12 10:35:02 PM czhower
  13. }
  14. unit IdDayTime;
  15. {*******************************************************}
  16. { }
  17. { Indy QUOTD Client TIdDayTime }
  18. { }
  19. { Copyright (C) 2000 Winshoes WOrking Group }
  20. { Started by J. Peter Mugaas }
  21. { 2000-April-23 }
  22. { }
  23. {*******************************************************}
  24. {2000-April-30 J. Peter Mugaas
  25. changed to drop control charactors and spaces from result to ease
  26. parsing}
  27. interface
  28. uses
  29. Classes,
  30. IdAssignedNumbers,
  31. IdTCPClient;
  32. type
  33. TIdDayTime = class(TIdTCPClient)
  34. protected
  35. Function GetDayTimeStr : String;
  36. public
  37. constructor Create(AOwner: TComponent); override;
  38. Property DayTimeStr : String read GetDayTimeStr;
  39. published
  40. property Port default IdPORT_DAYTIME;
  41. end;
  42. implementation
  43. uses
  44. SysUtils;
  45. { TIdDayTime }
  46. constructor TIdDayTime.Create(AOwner: TComponent);
  47. begin
  48. inherited;
  49. Port := IdPORT_DAYTIME;
  50. end;
  51. function TIdDayTime.GetDayTimeStr: String;
  52. begin
  53. Result := Trim ( ConnectAndGetAll );
  54. end;
  55. end.