IdDsnBaseCmpEdt.pas 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. Rev 1.2 9/5/2004 2:08:16 PM JPMugaas
  18. Should work in D9 NET.
  19. Rev 1.1 2/3/2004 11:42:50 AM JPMugaas
  20. Fixed for new design.
  21. Rev 1.0 11/13/2002 08:43:16 AM JPMugaas
  22. }
  23. unit IdDsnBaseCmpEdt;
  24. {$I IdCompilerDefines.inc}
  25. interface
  26. uses
  27. {$IFDEF DOTNET}
  28. Borland.Vcl.Design.DesignIntF,
  29. Borland.Vcl.Design.DesignEditors
  30. {$ELSE}
  31. {$IFDEF FPC}
  32. ComponentEditors
  33. {$ELSE}
  34. {$IFDEF VCL_6_OR_ABOVE}
  35. DesignIntf,
  36. DesignEditors
  37. {$ELSE}
  38. Dsgnintf
  39. {$ENDIF}
  40. {$ENDIF}
  41. {$ENDIF}
  42. ;
  43. type
  44. {$IFDEF FPC}
  45. TIdBaseComponentEditor = class(TDefaultComponentEditor)
  46. {$ELSE}
  47. TIdBaseComponentEditor = class(TDefaultEditor)
  48. {$ENDIF}
  49. public
  50. procedure ExecuteVerb(Index: Integer); override;
  51. function GetVerb(Index: Integer): string; override;
  52. function GetVerbCount: Integer; override;
  53. end;
  54. implementation
  55. uses
  56. IdAbout,
  57. IdGlobal,
  58. IdDsnCoreResourceStrings,
  59. SysUtils;
  60. { TIdBaseComponentEditor }
  61. procedure TIdBaseComponentEditor.ExecuteVerb(Index: Integer);
  62. begin
  63. case Index of
  64. 0 : ShowAboutBox(RSAAboutBoxCompName, gsIdVersion);
  65. end;
  66. end;
  67. function TIdBaseComponentEditor.GetVerb(Index: Integer): string;
  68. begin
  69. case Index of
  70. 0: Result := IndyFormat(RSAAboutMenuItemName, [gsIdVersion]);
  71. end;
  72. end;
  73. function TIdBaseComponentEditor.GetVerbCount: Integer;
  74. begin
  75. Result := 1;
  76. end;
  77. end.