瀏覽代碼

+ Use resourcestrings for messages, and changed TStringList to TStrings in ZipFiles

git-svn-id: trunk@4415 -
michael 19 年之前
父節點
當前提交
dabe92f8b8
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      fcl/inc/zipper.pp

+ 9 - 5
fcl/inc/zipper.pp

@@ -266,7 +266,7 @@ Type
     Constructor Create;
     Destructor Destroy;
     Procedure ZipAllFiles; virtual;
-    Procedure ZipFiles(AFileName : String; FileList : TStringList);
+    Procedure ZipFiles(AFileName : String; FileList : TStrings);
     Procedure Clear;
   Public
     Property BufferSize : Cardinal Read FBufSize Write SetBufSize;
@@ -283,6 +283,10 @@ Type
 
 Implementation
 
+ResourceString
+  SErrBufsizeChange = 'Changing buffer size is not allowed while zipping';
+  SErrOutputFileChange = 'Changing output file name is not allowed while zipping';
+
 { ---------------------------------------------------------------------
     Auxiliary
   ---------------------------------------------------------------------}
@@ -966,12 +970,12 @@ Begin
   end;
 end;
 
-
+  
 Procedure TZipper.SetBufSize(Value : Cardinal);
 
 begin
   If FZipping then
-    Raise EZipError.Create('Changing buffer size is not allowed while zipping');
+    Raise EZipError.Create(SErrBufsizeChange);
   If Value>=DefaultBufSize then
     FBufSize:=Value;
 end;
@@ -980,11 +984,11 @@ Procedure TZipper.SetFileName(Value : String);
 
 begin
   If FZipping then
-    Raise EZipError.Create('Changing output file name is not allowed while zipping');
+    Raise EZipError.Create(SErrOutputFileChange);
   FFileName:=Value;
 end;
 
-Procedure TZipper.ZipFiles(AFileName : String; FileList : TStringList);
+Procedure TZipper.ZipFiles(AFileName : String; FileList : TStrings);
 
 begin
   FFiles.Assign(FileList);