procedure SetUnRead(i: Integer);
procedure SetKotehanName(s: string);
procedure SetKotehanMail(s: string);
- procedure Create; overload;
+ procedure Init;
public
- constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;
+ constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
destructor Destroy; override;
property Context: DWORD read FContext write FContext;
procedure SetKokomade(i: Integer);
procedure SetUnRead(b: Boolean);
procedure SetScrollTop(i: Integer);
- procedure Create; overload;
+ procedure Init;
public
- constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;
+ constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
destructor Destroy; override;
function GetDatURL: string;
*************************************************************************)
constructor TBBS.Create(LogFolder: string);
begin
+ inherited Create;
Title := BBS2CH_NAME;
FLogFolder := LogFolder;
end;
//===================
constructor TCategory.Create;
begin
+ inherited;
end;
destructor TCategory.Destroy;
//===================
//TBoard
//===================
-procedure TBoard.Create;
+procedure TBoard.Init;
begin
FNo := 0;
FTitle := '';
// FItemNoVisible := True;
FUpdate := True;
-
- FBoardPlugIn := nil;
end;
// *************************************************************************
BBSID : string;
begin
- Create;
+ inherited Create;
+ Init;
FBoardPlugIn := inPlugIn;
URL := inURL;
i: Integer;
begin
Result := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- begin
- for i := 0 to Count - 1 do begin
- if Items[i].NewArrival then
- inc(Result);
- end;
- end else begin
- for i := 0 to Count - 1 do begin
- if Items[i].NewArrival then
- begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
- inc(Result);
- end;
- end;
- end;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].NewArrival then
+ inc(Result);
+ end;
+ end else begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].NewArrival then
+ begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
+ inc(Result);
+ end;
+ end;
+ end;
end;
function TBoard.GetLogThreadCount: Integer;
i: Integer;
begin
Result := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- begin
- for i := 0 to Count - 1 do begin
- if Items[i].IsLogFile then
- inc(Result);
- end;
- end else begin
- for i := 0 to Count - 1 do begin
- if Items[i].IsLogFile then
- begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
- inc(Result);
- end;
- end;
- end;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].IsLogFile then
+ inc(Result);
+ end;
+ end else begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].IsLogFile then
+ begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
+ inc(Result);
+ end;
+ end;
+ end;
end;
function TBoard.GetUserThreadCount: Integer;
i: Integer;
begin
Result := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- Result := Count
- else
- for i := 0 to Count - 1 do begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
- inc(Result);
- end;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ Result := Count
+ else
+ for i := 0 to Count - 1 do begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
+ inc(Result);
+ end;
end;
function TBoard.GetNewThread(Index: Integer): TThreadItem;
begin
Result := nil;
Cnt := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- begin
- for i := 0 to Count - 1 do begin
- if Items[i].NewArrival then
- begin
- if Index = Cnt then begin
- Result := Items[i];
- Exit;
- end;
- inc(Cnt);
- end;
- end;
- end else begin
- for i := 0 to Count - 1 do begin
- if Items[i].NewArrival then
- begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
- if Index = Cnt then begin
- Result := Items[i];
- Exit;
- end;
- inc(Cnt);
- end;
- end;
- end;
- end;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].NewArrival then
+ begin
+ if Index = Cnt then begin
+ Result := Items[i];
+ Exit;
+ end;
+ inc(Cnt);
+ end;
+ end;
+ end else begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].NewArrival then
+ begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
+ if Index = Cnt then begin
+ Result := Items[i];
+ Exit;
+ end;
+ inc(Cnt);
+ end;
+ end;
+ end;
+ end;
end;
function TBoard.GetLogThread(Index: Integer): TThreadItem;
i: Integer;
Cnt: Integer;
begin
- Cnt := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- begin
- for i := 0 to Count - 1 do begin
- if Items[i].IsLogFile then
- begin
- if Index = Cnt then begin
- Result := Items[i];
- Exit;
- end;
- inc(Cnt);
- end;
- end;
- end else begin
- for i := 0 to Count - 1 do begin
- if Items[i].IsLogFile then
- begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
- if Index = Cnt then begin
- Result := Items[i];
- Exit;
- end;
- inc(Cnt);
- end;
- end;
- end;
- end;
- Result := nil;
+ Cnt := 0;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].IsLogFile then
+ begin
+ if Index = Cnt then begin
+ Result := Items[i];
+ Exit;
+ end;
+ inc(Cnt);
+ end;
+ end;
+ end else begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].IsLogFile then
+ begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
+ if Index = Cnt then begin
+ Result := Items[i];
+ Exit;
+ end;
+ inc(Cnt);
+ end;
+ end;
+ end;
+ end;
+ Result := nil;
end;
function TBoard.GetUserThread(Index: Integer): TThreadItem;
begin
Result := nil;
Cnt := 0;
- if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
- begin
- for i := 0 to Count - 1 do begin
- if Index = Cnt then
- begin
- Result := Items[ i ];
- Exit;
- end;
- inc( Cnt );
- end;
- end else begin
- for i := 0 to Count - 1 do begin
- if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
- if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
- if Index = Cnt then begin
- Result := Items[i];
- Exit;
- end;
- inc(Cnt);
- end;
- end;
- end;
+ if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
+ begin
+ for i := 0 to Count - 1 do begin
+ if Index = Cnt then
+ begin
+ Result := Items[ i ];
+ Exit;
+ end;
+ inc( Cnt );
+ end;
+ end else begin
+ for i := 0 to Count - 1 do begin
+ if Items[i].ShortTitle = '' then
+ Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
+ if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
+ if Index = Cnt then begin
+ Result := Items[i];
+ Exit;
+ end;
+ inc(Cnt);
+ end;
+ end;
+ end;
end;
procedure TBoard.BeginUpdate;
end;}
//constructor TThreadItem.Create(AOwner: TComponent);
-procedure TThreadItem.Create;
+procedure TThreadItem.Init;
begin
FNo := 0;
FFileName := '';
READ_PATH = '/test/read.cgi';
begin
- Create;
+ inherited Create;
+ Init;
FBoardPlugIn := inPlugIn;
URL := inURL;