home *** CD-ROM | disk | FTP | other *** search
- // Version History
- // Num Date Notes
- // 1.00 May 3, 1999 Initial Release
-
- // Created By:
- // Joseph Wilcock
- // Coockoo@hotmail.com
- // http://msnhomepages.talkcity.com/RedmondAve/coockoo/
-
-
- unit JwStrRes;
-
- interface
-
- uses WinTypes, WinProcs, SysUtils, Classes, Controls;
-
- type
- TJwStringResource = class(TComponent)
- private
- { Private fields of TJwStringResource }
- FMain : TStrings;
- FTagName : String;
- { Private methods of TJwStringResource }
- function GetMain: TStrings;
- procedure SetMain( Value: TStrings );
- function GetTagName: String;
- procedure SetTagName( Value: String );
- protected
- { Protected fields of TJwStringResource }
-
- { Protected methods of TJwStringResource }
- procedure Loaded; override;
-
- public
- { Public fields and properties of TJwStringResource }
-
- { Public methods of TJwStringResource }
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- function Execute: Boolean;
- published
- { Published properties of TJwStringResource }
- property Lines: TStrings read GetMain write SetMain;
- property TagName: String read GetTagName write SetTagName;
- end;
-
- procedure Register;
-
- implementation
-
- procedure Register;
- begin
- { Register TJwStringResource with JwTools as its
- default page on the Delphi component palette }
- RegisterComponents('JwTools', [TJwStringResource]);
- end;
-
- { Read method for property Main }
- function TJwStringResource.GetMain : TStrings;
- begin
- Result := FMain;
- end;
-
- { Write method for property Main }
- procedure TJwStringResource.SetMain(Value : TStrings);
- begin
- FMain.Assign(Value);
- end;
-
- { Read method for property TagName }
- function TJwStringResource.GetTagName : String;
- begin
- Result := FTagName;
- end;
-
- { Write method for property TagName }
- procedure TJwStringResource.SetTagName(Value : String);
- begin
- if FTagName <> Value then
- FTagName := Value;
- end;
-
- constructor TJwStringResource.Create(AOwner: TComponent);
- begin
- inherited Create(AOwner);
- FMain := TStringList.Create;
- end;
-
- destructor TJwStringResource.Destroy;
- begin
- FMain.Free;
- inherited Destroy;
- end;
-
- function TJwStringResource.Execute : Boolean;
- begin
- Result := True
- end;
-
- procedure TJwStringResource.Loaded;
- begin
- inherited Loaded;
- end;
-
- end.
-