Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/AbonUnit.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.44 by h677, Sun Feb 18 08:09:21 2007 UTC revision 1.45 by h677, Sun Aug 5 12:43:24 2007 UTC
# Line 115  type Line 115  type
115          //--          //--
116          function TreatSyria(AString: string): string;          function TreatSyria(AString: string): string;
117      //--      //--
118        function AddToken(AString: string; Invisible: Boolean): Boolean;
119    end;    end;
120  var  var
121          Abon1 :TAbon;          Abon1 :TAbon;
# Line 905  begin Line 906  begin
906          Result := Result + AString;          Result := Result + AString;
907  end;  end;
908    
909    // NGワードファイルに追加 追加された場合、Trueがかえる
910    function TAbon.AddToken(AString: string; Invisible: Boolean): Boolean;
911    var
912            bufStringList : TStringList;
913        ngword: String;
914    begin
915        Result := False;
916        if FileExists(GetNGwordpath) then begin
917            bufStringList := TStringList.Create;
918            try
919                bufStringList.LoadFromFile(GetNGwordpath);
920                if (Invisible) then begin
921                    ngword := #9 + AString;
922                end else begin
923                    ngword := AString;
924                end;
925                if (bufStringList.IndexOf(ngword) = -1) then begin
926                    bufStringList.Add(ngword);
927                    bufStringList.SaveToFile(GetNGwordpath);
928                    Result := True;
929                end;
930            finally
931                bufStringList.Free;
932            end;
933        end;
934    end;
935    
936    
937  end.  end.

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26