home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / delphi / kolekce / d345 / JWTOOL.ZIP / jwtool / JwStrRes.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-29  |  2.4 KB  |  106 lines

  1. //  Version History
  2. //     Num     Date        Notes
  3. //     1.00  May 3, 1999   Initial Release
  4.  
  5. //  Created By:
  6. //    Joseph Wilcock
  7. //    Coockoo@hotmail.com
  8. //    http://msnhomepages.talkcity.com/RedmondAve/coockoo/
  9.  
  10.  
  11. unit JwStrRes;
  12.  
  13. interface
  14.  
  15. uses WinTypes, WinProcs, SysUtils, Classes, Controls;
  16.  
  17. type
  18.   TJwStringResource = class(TComponent)
  19.     private
  20.       { Private fields of TJwStringResource }
  21.       FMain : TStrings;
  22.       FTagName : String;
  23.       { Private methods of TJwStringResource }
  24.       function GetMain: TStrings;
  25.       procedure SetMain( Value: TStrings );
  26.       function GetTagName: String;
  27.       procedure SetTagName( Value: String );
  28.     protected
  29.       { Protected fields of TJwStringResource }
  30.  
  31.       { Protected methods of TJwStringResource }
  32.       procedure Loaded; override;
  33.  
  34.     public
  35.       { Public fields and properties of TJwStringResource }
  36.  
  37.       { Public methods of TJwStringResource }
  38.       constructor Create(AOwner: TComponent); override;
  39.       destructor Destroy; override;
  40.       function Execute: Boolean;
  41.     published
  42.       { Published properties of TJwStringResource }
  43.       property Lines: TStrings read GetMain write SetMain;
  44.       property TagName: String read GetTagName write SetTagName;
  45.     end;
  46.  
  47. procedure Register;
  48.  
  49. implementation
  50.  
  51. procedure Register;
  52. begin
  53.      { Register TJwStringResource with JwTools as its
  54.        default page on the Delphi component palette }
  55.   RegisterComponents('JwTools', [TJwStringResource]);
  56. end;
  57.  
  58. { Read method for property Main }
  59. function TJwStringResource.GetMain : TStrings;
  60. begin
  61.   Result := FMain;
  62. end;
  63.  
  64. { Write method for property Main }
  65. procedure TJwStringResource.SetMain(Value : TStrings);
  66. begin
  67.   FMain.Assign(Value);
  68. end;
  69.  
  70. { Read method for property TagName }
  71. function TJwStringResource.GetTagName : String;
  72. begin
  73.   Result := FTagName;
  74. end;
  75.  
  76. { Write method for property TagName }
  77. procedure TJwStringResource.SetTagName(Value : String);
  78. begin
  79.   if FTagName <> Value then
  80.     FTagName := Value;
  81. end;
  82.  
  83. constructor TJwStringResource.Create(AOwner: TComponent);
  84. begin
  85.   inherited Create(AOwner);
  86.   FMain := TStringList.Create;
  87. end;
  88.  
  89. destructor TJwStringResource.Destroy;
  90. begin
  91.   FMain.Free;
  92.   inherited Destroy;
  93. end;
  94.  
  95. function TJwStringResource.Execute : Boolean;
  96. begin
  97.   Result := True
  98. end;
  99.  
  100. procedure TJwStringResource.Loaded;
  101. begin
  102.   inherited Loaded;
  103. end;
  104.  
  105. end.
  106.