property Count[RoundType: TGikoRoundType]: Integer read GetCount;
property OldFileRead: Boolean read FOldFileRead;
property Items[Index: integer; RoundType: TGikoRoundType]: TRoundItem read GetRoundItem;
- //procedure SetRoundName(Board: TBoard; RoundName: string); overload;
- //procedure SetRoundName(ThreadItem: TThreadItem; RoundName: string); overload;
-
procedure LoadRoundBoardFile;
procedure LoadRoundThreadFile;
procedure SaveRoundFile;
TRoundItem = class(TObject)
private
-//
FItem : TObject;
- FBBSType: TGikoBBSType;
- FRoundName: string;
FRoundType: TGikoRoundType;
- //Item : TObject;
- //FURL : string;
- //FBoardTitle: string;
- //FThreadTitle: string;
- //FFileName: string;
FTmpURL : string;
FBoolData: Boolean; //\82¢\82ë\82¢\82ë\8eg\82¤\82å\82£
function GetBoardTitle : string;
function GetThreadTitle : string;
function GetURL : string;
function GetFileName : string;
+ //! \8f\84\89ñ\96¼\8eæ\93¾
+ function GetRoundName : string;
public
-
constructor Create;
property Item : TObject read FItem;
- //property BBSType: TGikoBBSType read FBBSType write FBBSType;
- property RoundName: string read FRoundName write FRoundName;
+ property RoundName: string read GetRoundName;
property RoundType: TGikoRoundType read FRoundType write FRoundType;
- //property Item : TObject read FItem write FItem;
property URL : string read GetURL;
property TmpURL : string read FTmpURL write FTmpURL;
property BoardTitle: string read GetBoardTitle;
ROUND_INDEX_VERSION: string = '2.00';
ERROR_BOARD_FILENAME: string = 'ErrorBoard.2ch'; //Error\8ds\82ð\95Û\8aÇ\82·\82é
ERROR_ITEM_FILENAME: string = 'ErrorItem.2ch'; //Error\8ds\82ð\95Û\8aÇ\82·\82é
+//! \8f\84\89ñ\83A\83C\83e\83\80\83R\83\93\83X\83g\83\89\83N\83^
constructor TRoundItem.Create;
begin
inherited Create;
end;
+//! \94Â\96¼\8eæ\93¾
function TRoundItem.GetBoardTitle : string;
begin
Result := '';
end;
end;
end;
+//! \83X\83\8c\83b\83h\96¼\8eæ\93¾
function TRoundItem.GetThreadTitle : string;
begin
Result := '';
end;
end;
end;
+//! URL\8eæ\93¾
function TRoundItem.GetURL : string;
begin
Result := '';
end;
end;
end;
+//! \83X\83\8c\83b\83h\82Ì\83t\83@\83C\96¼\8eæ\93¾
function TRoundItem.GetFileName : string;
begin
Result := '';
end;
end;
end;
+//! \8f\84\89ñ\96¼\8eæ\93¾
+function TRoundItem.GetRoundName : string;
+begin
+ Result := '';
+ if( Self.FItem <> nil) then begin
+ if( Self.FItem is TBoard) then begin
+ Result := TBoard(Self.FItem).RoundName;
+ end else if( Self.FItem is TThreadItem) then begin
+ Result := TThreadItem(Self.FItem).RoundName;
+ end;
+ end;
+end;
+//! \8f\84\89ñ\83\8a\83X\83g\83R\83\93\83X\83g\83\89\83N\83^
constructor TRoundList.Create;
begin
inherited;
RoundNameList.Duplicates := dupIgnore;
FOldFileRead := false;
end;
-
+//! \8f\84\89ñ\83\8a\83X\83g\83f\83X\83g\83\89\83N\83^
destructor TRoundList.Destroy;
begin
RoundNameList.Free;
FItemList.Free;
//inherited;
end;
-
+//! \8f\84\89ñ\97\\96ñ\92Ç\89Á\81i\94Â\81j
function TRoundList.Add(Board: TBoard): Integer;
var
idx: Integer;
begin
Result := -1;
idx := Find(Board);
- //RoundNameList.Add(Board.RoundName);
if idx = -1 then begin
Item := TRoundItem.Create;
Item.FItem := Board;
// Item.BBSType := gbt2ch; //\82Æ\82è\82 \82¦\82¸
Item.RoundType := grtBoard;
-// Item.Item := Board;
- //Item.URL := Board.URL;
- //Item.BoardTitle := Board.Title;
- //Item.ThreadTitle := '';
- //Item.FileName := '';
- Item.RoundName := Board.RoundName;
Result := FBoardList.Add(Item);
end;
end;
-
+//! \8f\84\89ñ\97\\96ñ\92Ç\89Á\81i\83X\83\8c\83b\83h\81j
function TRoundList.Add(ThreadItem: TThreadItem): Integer;
var
idx: Integer;
begin
Result := -1;
idx := Find(ThreadItem);
- //RoundNameList.Add(ThreadItem.RoundName);
if idx = -1 then begin
Item := TRoundItem.Create;
Item.FItem := ThreadItem;
// Item.BBSType := gbt2ch; //\82Æ\82è\82 \82¦\82¸
Item.RoundType := grtItem;
-// Item.Item := ThreadItem;
- //Item.URL := Threaditem.URL;
- //Item.BoardTitle := ThreadItem.ParentBoard.Title;
- //Item.ThreadTitle := ThreadItem.Title;
- //Item.FileName := ThreadItem.FileName;
- Item.RoundName := ThreadItem.RoundName;
Result := FItemList.Add(Item);
end;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8dí\8f\9c\81i\94Â\81j
procedure TRoundList.Delete(Board: TBoard);
var
idx: Integer;
-// Item: TRoundItem;
begin
idx := Find(Board);
if idx <> -1 then begin
FBoardList.Delete(idx);
end;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8dí\8f\9c\81i\83X\83\8c\83b\83h\81j
procedure TRoundList.Delete(ThreadItem: TThreadItem);
var
idx: Integer;
-// Item: TRoundItem;
begin
idx := Find(ThreadItem);
if idx <> -1 then begin
FItemList.Delete(idx);
end;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8fÁ\8b\8e
procedure TRoundList.Clear;
var
i: Integer;
end;
FItemList.Capacity := FItemList.Count;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8c\9f\8dõ\81i\94Â\81j
function TRoundList.Find(Board: TBoard): Integer;
var
i: Integer;
end;
end;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8c\9f\8dõ\81i\83X\83\8c\83b\83h\81j
function TRoundList.Find(ThreadItem: TThreadItem): Integer;
var
i: Integer;
end;
end;
end;
+//! \8f\84\89ñ\97\\96ñ\8c\9f\8dõ\81iURL\81{\83A\83C\83e\83\80\83^\83C\83v\81j
function TRoundList.Find(URL: string; RoundType: TGikoRoundType): Integer;
var
i: Integer;
end;
end;
end;
+//! \8f\84\89ñ\97\\96ñ\8dí\8f\9c\81iURL\81{\83A\83C\83e\83\80\83^\83C\83v\81j
procedure TRoundList.Delete(URL: string; RoundType: TGikoRoundType);
var
idx: Integer;
board := TBoard(Item);
Item.Free;
FBoardList.Delete(idx);
- //board := BBSsFindBoardFromURL(URL);
if board <> nil then begin
board.Round := False;
board.RoundName := '';
Item.Free;
FItemList.Delete(idx);
- //threadItem := BBSsFindThreadFromURL(URL);
if threadItem <> nil then begin
threadItem.Round := false;
threadItem.RoundName := '';
end;
end;
end;
-{
-procedure TRoundList.SetRoundName(Board: TBoard; RoundName: string);
-var
- idx: Integer;
- Item: TRoundItem;
-begin
- idx := Find(Board);
- if idx <> -1 then begin
- Item := TRoundItem(FBoardList[idx]);
- Item.RoundName := RoundName;
- end;
-end;
-}
-{
-procedure TRoundList.SetRoundName(ThreadItem: TThreadItem; RoundName: string);
-var
- idx: Integer;
- Item: TRoundItem;
-begin
- idx := Find(ThreadItem);
- if idx <> -1 then begin
- Item := TRoundItem(FItemList[idx]);
- Item.RoundName := RoundName;
- end;
-end;
-}
+//! \8f\84\89ñ\97\\96ñ\90\94\8eæ\93¾
function TRoundList.GetCount(RoundType: TGikoRoundType): Integer;
begin
Result := 0;
else if RoundType = grtItem then
Result := FItemList.Count;
end;
-
+//! \8f\84\89ñ\97\\96ñ\8eæ\93¾
function TRoundList.GetRoundItem(Index: Integer; RoundType: TGikoRoundType): TRoundItem;
begin
Result := nil;
Result := TRoundItem(FItemList[Index]);
end;
end;
+//! \83{\81[\83h\8f\84\89ñ\97\\96ñ\83t\83@\83C\83\8b\93Ç\82Ý\8d\9e\82Ý
procedure TRoundList.LoadRoundBoardFile;
var
i: Integer;
FileName, bFileName: string;
errorSl: TStringList;
errorFileName: string;
- //Item: TRoundItem;
delCount: Integer;
begin
sl := TStringList.Create;
sl.Free;
end;
end;
+//! \83X\83\8c\83b\83h\8f\84\89ñ\97\\96ñ\83t\83@\83C\83\8b\93Ç\82Ý\8d\9e\82Ý
procedure TRoundList.LoadRoundThreadFile;
var
i: Integer;
-// j: Integer;
sl: TStringList;
FileName, bFileName: string;
errorSl: TStringList;
errorFileName: string;
-// Item: TRoundItem;
delCount: Integer;
-// boardList : TStringList;
begin
-// boardList := TStringList.Create;
-// boardList.Duplicates := dupIgnore;
errorSl := TStringList.Create;
errorSl.Duplicates := dupIgnore;
sl := TStringList.Create;
end;
end;
end;
-// j := boardList.Count - 1;
-// while j >= 0 do begin
-// GikoSys.ReadSubjectFile( BBSsFindBoardFromURL( boardList[j] ) );
-// boardList.Delete(j);
-// Dec(j);
-// end;
if errorSl.Count > 0 then
errorSl.SaveToFile(errorFileName);
end;
finally
errorSl.Free;
sl.Free;
-// boardList.Free;
end;
end;
+//! \8f\84\89ñ\97\\96ñ\83t\83@\83C\83\8b\95Û\91¶
procedure TRoundList.SaveRoundFile;
var
i: integer;