function GetCategoryResistWords(Key: String; var list: TStringList): Integer;
//! \93o\98^\8dÏ\82Ý\83L\81[\82Ì\91S\82Ä\82Ì\83J\83e\83S\83\8a\83\8a\83X\83g\8eæ\93¾
procedure GetCategoryList(var list: TStringList);
+ //! \8aù\82É\93o\98^\8dÏ\82Ý\82Ì\83L\81[\82Æ\83J\83e\83S\83\8a\82Ì\83Z\83b\83g\82©\82Ç\82¤\82©\83`\83F\83b\83N
+ function IsDupulicate(Key: String; Category: String): Boolean;
end;
begin
FInit := True;
try
- // ini\83t\83@\83C\83\8b\82ª\96³\82¯\82ê\82Î\81A\83f\83t\83H\83\8b\83g\82ð\83\8a\83l\81[\83\80\82·\82é
- if not FileExists(FilePath) then begin
- CopyFile(
- PChar(ChangeFileExt(FilePath, '.default')),
- PChar(FilePath), True);
- end;
-
// \83t\83@\83C\83\8b\82Ì\91¶\8dÝ\82ð\8am\94F
if FileExists(FilePath) then begin
- ini := TMemIniFile.Create(FilePath);
+ ini := TMemIniFile.Create(FilePath);
sections := TStringList.Create;
keys := TStringList.Create;
try
except
end;
end;
+//! \8aù\82É\93o\98^\8dÏ\82Ý\82Ì\83L\81[\82Æ\83J\83e\83S\83\8a\82Ì\83Z\83b\83g\82©\82Ç\82¤\82©\83`\83F\83b\83N
+function TInputAssistDM.IsDupulicate(Key: String; Category: String): Boolean;
+var
+ i : Integer;
+begin
+ // \82±\82Ì\83\81\83\\83b\83h\82Å\82Í\81A\83\\81[\83g\8dÏ\82Ý\82Æ\82Í\8cÀ\82ç\82È\82¢\82Ì\82Å\81A\91S\82Ä\82Ì\83L\81[\82ð\92T\8dõ\82µ\82Ä\82¢\82é
+ Result := False;
+ if (FDictionary <> nil) then begin
+ for i := 0 to FDictionary.Count - 1 do begin
+ if (Key = FDictionary.Strings[i]) and
+ (Category = TResistWord(FDictionary.Objects[i]).GetCategory)
+ then begin
+ Result := True;
+ Break;
+ end;
+ end;
+ end;
+end;
end.