| 25 |
function Getlistpath() : String; |
function Getlistpath() : String; |
| 26 |
procedure Setlistpath(const Value : String); |
procedure Setlistpath(const Value : String); |
| 27 |
function LoadListFile(path :String;listStringList : TStringList) : Boolean; |
function LoadListFile(path :String;listStringList : TStringList) : Boolean; |
| 28 |
|
function ReadNGwordslist(line : Integer) : Boolean; |
| 29 |
public |
public |
| 30 |
{ Public 宣言 } |
{ Public 宣言 } |
| 31 |
constructor Create; // コンストラクタ |
constructor Create; // コンストラクタ |
| 88 |
begin |
begin |
| 89 |
inherited; |
inherited; |
| 90 |
end; |
end; |
|
|
|
|
|
|
|
|
|
| 91 |
//rootはExe\config\NGwordsフォルダ |
//rootはExe\config\NGwordsフォルダ |
| 92 |
procedure TAbon.Setroot(root :String); |
procedure TAbon.Setroot(root :String); |
| 93 |
var |
var |
| 256 |
if AnsiPos(Ftokens[i][j],line) = 0 then begin |
if AnsiPos(Ftokens[i][j],line) = 0 then begin |
| 257 |
hit := false; |
hit := false; |
| 258 |
break; |
break; |
| 259 |
|
end else begin |
| 260 |
|
Delete(line,AnsiPos(Ftokens[i][j],line),Length(Ftokens[i][j])); |
| 261 |
end; |
end; |
| 262 |
end; |
end; |
| 263 |
if hit = true then begin |
if hit = true then begin |
| 545 |
Result := false; |
Result := false; |
| 546 |
end; |
end; |
| 547 |
end; |
end; |
| 548 |
|
//複数のNGワードテキストを読み込む============================================== |
| 549 |
//Listファイルを読み込む |
//Listファイルを読み込む |
| 550 |
function TAbon.LoadListFile(path :String; listStringList : TStringList) : Boolean; |
function TAbon.LoadListFile(path :String; listStringList : TStringList) : Boolean; |
| 551 |
begin |
begin |
| 560 |
end; |
end; |
| 561 |
//Listの一つ次のNGワードファイルを読み込む |
//Listの一つ次のNGワードファイルを読み込む |
| 562 |
function TAbon.GoForward() : Boolean; |
function TAbon.GoForward() : Boolean; |
| 563 |
|
begin |
| 564 |
|
FNGwordFileIndex := FNGwordFileIndex + 1; |
| 565 |
|
Result := ReadNGwordslist(FNGwordFileIndex); |
| 566 |
|
end; |
| 567 |
|
//Listの一つ前のNGワードファイルを読み込む |
| 568 |
|
function TAbon.GoBack() : Boolean; |
| 569 |
|
begin |
| 570 |
|
FNGwordFileIndex := FNGwordFileIndex -1; |
| 571 |
|
Result := ReadNGwordslist(FNGwordFileIndex); |
| 572 |
|
end; |
| 573 |
|
//Listの1行目を読む |
| 574 |
|
procedure TAbon.GoHome(); |
| 575 |
|
begin |
| 576 |
|
FNGwordFileIndex := 0; |
| 577 |
|
ReadNGwordslist(FNGwordFileIndex); |
| 578 |
|
end; |
| 579 |
|
//Listのline行目を読む |
| 580 |
|
function TAbon.ReadNGwordslist(line : Integer) : Boolean; |
| 581 |
var |
var |
| 582 |
liststl : TStringList; |
liststl : TStringList; |
| 583 |
linebuf : String; |
linebuf : String; |
| 585 |
liststl := TStringList.Create; |
liststl := TStringList.Create; |
| 586 |
try |
try |
| 587 |
if LoadListFile(Flistpath,liststl) = true then begin |
if LoadListFile(Flistpath,liststl) = true then begin |
| 588 |
FNGwordFileIndex := FNGwordFileIndex + 1; |
if line < 0 then begin |
| 589 |
if FNGwordFileIndex > liststl.Count -1 then begin |
line := liststl.Count - 1; |
| 590 |
|
FNGwordFileIndex := liststl.Count - 1; |
| 591 |
|
end else if line > liststl.Count - 1 then begin |
| 592 |
|
line := 0; |
| 593 |
FNGwordFileIndex := 0; |
FNGwordFileIndex := 0; |
| 594 |
end; |
end; |
| 595 |
linebuf := liststl.Strings[FNGwordFileIndex]; |
linebuf := liststl.Strings[line]; |
| 596 |
FNGwordname := Copy(linebuf,1,AnsiPos('=',linebuf)-1); |
FNGwordname := Copy(linebuf,1,AnsiPos('=',linebuf)-1); |
| 597 |
Delete(linebuf,1,AnsiPos('=',linebuf)); |
Delete(linebuf,1,AnsiPos('=',linebuf)); |
|
|
|
| 598 |
SetNGwordpath(linebuf); |
SetNGwordpath(linebuf); |
| 599 |
Result := true; |
Result := true; |
| 600 |
end else begin |
end else begin |
| 605 |
end; |
end; |
| 606 |
|
|
| 607 |
end; |
end; |
| 608 |
//Listの一つ前のNGワードファイルを読み込む |
//複数のNGワードテキストを読み込む=====ここまで================================= |
|
function TAbon.GoBack() : Boolean; |
|
|
begin |
|
|
FNGwordFileIndex := FNGwordFileIndex -2; |
|
|
if FNGwordFileIndex < -1 then FNGwordFileIndex := 0; |
|
|
Result := GoForward() |
|
|
end; |
|
|
//Listの1行目を読む |
|
|
procedure TAbon.GoHome(); |
|
|
begin |
|
|
FNGwordFileIndex := -1; |
|
|
GoForward(); |
|
|
end; |
|
| 609 |
end. |
end. |
| 610 |
|
|