| 495 |
idx: Integer; |
idx: Integer; |
| 496 |
usePlugIn : Boolean; |
usePlugIn : Boolean; |
| 497 |
function MakeThreadCallBack( |
function MakeThreadCallBack( |
| 498 |
inURL : PChar; // スレッドの URL |
inInstance : DWORD; // TBoardItem のインスタンス |
| 499 |
inTitle : PChar; // スレタイ |
inURL : PChar; // スレッドの URL |
| 500 |
inCount : DWORD // レスの数 |
inTitle : PChar; // スレタイ |
| 501 |
) : Boolean; stdcall; // 列挙を続けるなら True |
inCount : DWORD // レスの数 |
| 502 |
|
) : Boolean; stdcall; // 列挙を続けるなら True |
| 503 |
|
var |
| 504 |
|
threadItem : TThreadItem; |
| 505 |
|
boardItem : TBoard; |
| 506 |
|
index : Integer; |
| 507 |
|
roundItem : TRoundItem; |
| 508 |
begin |
begin |
| 509 |
Result := True; |
Result := True; |
| 510 |
Rec := ParseIndexLine(sl[i]); |
boardItem := TBoard( inInstance ); |
| 511 |
|
|
| 512 |
ThreadItem := TThreadItem.Create( Board.BoardPlugIn, inURL ); |
threadItem := TThreadItem.Create( boardItem.BoardPlugIn, string( inURL ) ); |
| 513 |
ThreadItem.BeginUpdate; |
threadItem.BeginUpdate; |
| 514 |
|
|
| 515 |
ThreadItem.Title := inTitle; |
threadItem.Title := string( inTitle ); |
| 516 |
ThreadItem.Count := inCount; |
threadItem.Count := inCount; |
| 517 |
ThreadItem.ParentBoard := Board; |
threadItem.ParentBoard := Board; |
| 518 |
|
|
| 519 |
//巡回リストに存在したら巡回フラグセット |
//巡回リストに存在したら巡回フラグセット |
| 520 |
if ThreadItem.IsLogFile then begin |
if threadItem.IsLogFile then begin |
| 521 |
idx := RoundList.Find( ThreadItem ); |
index := RoundList.Find( ThreadItem ); |
| 522 |
if idx <> -1 then begin |
if index <> -1 then begin |
| 523 |
RoundItem := RoundList.Items[idx, grtItem]; |
roundItem := RoundList.Items[index, grtItem]; |
| 524 |
ThreadItem.RoundName := RoundItem.RoundName; |
threadItem.RoundName := roundItem.RoundName; |
| 525 |
ThreadItem.Round := True; |
threadItem.Round := True; |
| 526 |
end; |
end; |
| 527 |
end; |
end; |
| 528 |
|
|
| 529 |
ThreadItem.EndUpdate; |
threadItem.EndUpdate; |
| 530 |
Board.Add( ThreadItem ); |
boardItem.Add( ThreadItem ); |
| 531 |
|
|
| 532 |
if (ThreadItem.IsLogFile) and (ThreadItem.UnRead) then |
if (threadItem.IsLogFile) and (threadItem.UnRead) then |
| 533 |
Inc( UnRead ); |
Inc( UnRead ); |
| 534 |
end; |
end; |
| 535 |
begin |
begin |
| 575 |
try |
try |
| 576 |
if usePlugIn then begin |
if usePlugIn then begin |
| 577 |
board.BoardPlugIn.EnumThread( DWORD( Board ), @MakeThreadCallBack ); |
board.BoardPlugIn.EnumThread( DWORD( Board ), @MakeThreadCallBack ); |
| 578 |
|
|
| 579 |
|
if UnRead <> Board.UnRead then |
| 580 |
|
Board.UnRead := UnRead; |
| 581 |
|
|
| 582 |
|
//インデックスに無かったログを追加(腐れインデックス対応) |
| 583 |
|
for i := 0 to FileList.Count - 1 do begin |
| 584 |
|
FileName := ExtractFileDir(Board.FilePath) + '\' + FileList[i]; |
| 585 |
|
|
| 586 |
|
ResRec := DivideStrLine(ReadThreadFile(FileName, 1)); |
| 587 |
|
ThreadItem := TThreadItem.Create; |
| 588 |
|
ThreadItem.No := Board.Count + 1; |
| 589 |
|
ThreadItem.FileName := FileList[i]; |
| 590 |
|
ThreadItem.Title := ResRec.FTitle; |
| 591 |
|
ThreadItem.Count := GetFileLineCount(FileName); |
| 592 |
|
ThreadItem.AllResCount := ThreadItem.Count; |
| 593 |
|
ThreadItem.NewResCount := 0; |
| 594 |
|
ThreadItem.Size := 0; |
| 595 |
|
ThreadItem.RoundDate := ZERO_DATE; |
| 596 |
|
ThreadItem.LastModified := ZERO_DATE; |
| 597 |
|
ThreadItem.Kokomade := -1; |
| 598 |
|
ThreadItem.NewReceive := 0; |
| 599 |
|
ThreadItem.ParentBoard := Board; |
| 600 |
|
ThreadItem.IsLogFile := True; |
| 601 |
|
ThreadItem.Round := False; |
| 602 |
|
ThreadItem.UnRead := False; |
| 603 |
|
ThreadItem.ScrollTop := 0; |
| 604 |
|
ThreadItem.AgeSage := gasNone; |
| 605 |
|
Board.Add(ThreadItem); |
| 606 |
|
end; |
| 607 |
end else begin |
end else begin |
| 608 |
sl.LoadFromFile(FileName); |
sl.LoadFromFile(FileName); |
| 609 |
|
|
| 680 |
if (ThreadItem.IsLogFile) and (ThreadItem.UnRead) then |
if (ThreadItem.IsLogFile) and (ThreadItem.UnRead) then |
| 681 |
Inc(UnRead); |
Inc(UnRead); |
| 682 |
end; |
end; |
|
end; |
|
|
if UnRead <> Board.UnRead then |
|
|
Board.UnRead := UnRead; |
|
| 683 |
|
|
| 684 |
//インデックスに無かったログを追加(腐れインデックス対応) |
if UnRead <> Board.UnRead then |
| 685 |
for i := 0 to FileList.Count - 1 do begin |
Board.UnRead := UnRead; |
| 686 |
FileName := ExtractFileDir(Board.GetFolderIndexFileName) + '\' + FileList[i]; |
|
| 687 |
|
//インデックスに無かったログを追加(腐れインデックス対応) |
| 688 |
ResRec := DivideStrLine(ReadThreadFile(FileName, 1)); |
for i := 0 to FileList.Count - 1 do begin |
| 689 |
ThreadItem := TThreadItem.Create; |
FileName := ExtractFileDir(Board.GetFolderIndexFileName) + '\' + FileList[i]; |
| 690 |
ThreadItem.No := Board.Count + 1; |
|
| 691 |
ThreadItem.FileName := FileList[i]; |
ResRec := DivideStrLine(ReadThreadFile(FileName, 1)); |
| 692 |
ThreadItem.Title := ResRec.FTitle; |
ThreadItem := TThreadItem.Create; |
| 693 |
ThreadItem.Count := GetFileLineCount(FileName); |
ThreadItem.No := Board.Count + 1; |
| 694 |
ThreadItem.AllResCount := ThreadItem.Count; |
ThreadItem.FileName := FileList[i]; |
| 695 |
ThreadItem.NewResCount := 0; |
ThreadItem.Title := ResRec.FTitle; |
| 696 |
ThreadItem.Size := 0; |
ThreadItem.Count := GetFileLineCount(FileName); |
| 697 |
ThreadItem.RoundDate := ZERO_DATE; |
ThreadItem.AllResCount := ThreadItem.Count; |
| 698 |
ThreadItem.LastModified := ZERO_DATE; |
ThreadItem.NewResCount := 0; |
| 699 |
ThreadItem.Kokomade := -1; |
ThreadItem.Size := 0; |
| 700 |
ThreadItem.NewReceive := 0; |
ThreadItem.RoundDate := ZERO_DATE; |
| 701 |
ThreadItem.ParentBoard := Board; |
ThreadItem.LastModified := ZERO_DATE; |
| 702 |
ThreadItem.IsLogFile := True; |
ThreadItem.Kokomade := -1; |
| 703 |
ThreadItem.Round := False; |
ThreadItem.NewReceive := 0; |
| 704 |
ThreadItem.UnRead := False; |
ThreadItem.ParentBoard := Board; |
| 705 |
ThreadItem.ScrollTop := 0; |
ThreadItem.IsLogFile := True; |
| 706 |
ThreadItem.AgeSage := gasNone; |
ThreadItem.Round := False; |
| 707 |
Board.Add(ThreadItem); |
ThreadItem.UnRead := False; |
| 708 |
end; |
ThreadItem.ScrollTop := 0; |
| 709 |
|
ThreadItem.AgeSage := gasNone; |
| 710 |
|
Board.Add(ThreadItem); |
| 711 |
|
end; |
| 712 |
|
end; |
| 713 |
finally |
finally |
| 714 |
sl.Free; |
sl.Free; |
| 715 |
end; |
end; |