Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/InputAssistDataModule.pas

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

revision 1.7 by h677, Mon May 29 15:34:46 2006 UTC revision 1.7.2.1 by h677, Wed May 31 15:39:42 2006 UTC
# Line 37  type Line 37  type
37          function GetCategoryResistWords(Key: String; var list: TStringList): Integer;          function GetCategoryResistWords(Key: String; var list: TStringList): Integer;
38          //! 登録済みキーの全てのカテゴリリスト取得          //! 登録済みキーの全てのカテゴリリスト取得
39          procedure GetCategoryList(var list: TStringList);          procedure GetCategoryList(var list: TStringList);
40            //! 既に登録済みのキーとカテゴリのセットかどうかチェック
41            function IsDupulicate(Key: String; Category: String): Boolean;
42    
43    end;    end;
44    
# Line 409  begin Line 411  begin
411          except          except
412          end;          end;
413  end;  end;
414    //! 既に登録済みのキーとカテゴリのセットかどうかチェック
415    function TInputAssistDM.IsDupulicate(Key: String; Category: String): Boolean;
416    var
417            i : Integer;
418            resWord : TResistWord;
419    begin
420            // このメソッドでは、ソート済みとは限らないので、全てのキーを探索している
421            Result := False;
422            if (FDictionary <> nil) then begin
423                    for i := 0 to FDictionary.Count - 1 do begin
424                            if (Key = FDictionary.Strings[i]) and
425                                    (Category = TResistWord(FDictionary.Objects[i]).GetCategory)
426                            then begin
427                                    Result := True;
428                                    Break;
429                            end;
430                    end;
431            end;
432    end;
433    
434  end.  end.

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.1

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