uses
Messages, SysUtils, Classes, Contnrs, ComCtrls, {HttpApp,} YofUtils,
- GikoSystem{, XMLIntf, XMLDoc}, GikoXMLDoc, BoardGroup;
+ GikoSystem{, XMLIntf, XMLDoc}, GikoXMLDoc, BoardGroup, windows;
{SAX, SAXHelpers, SAXComps, SAXKW;}
type
if FStack.Count <> 0 then
FStack.Pop;
end else if Node.NodeName = 'favitem' then begin
- ParentNode := FStack.Peek;
- if TObject(ParentNode.Data) is TFavoriteFolder then begin
- if Node.Attributes['favtype'] = 'board' then begin
- // \8b\8c\8e®\82Ì\82¨\8bC\82É\93ü\82è\82Æ\82Ì\8cÝ\8a·\90«\82Ì\82½\82ß
- if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin
- board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
- FavBoard := TFavoriteBoardItem.Create(
- board.URL, Node.Attributes[ 'title' ], board );
- end else begin
- FavBoard := TFavoriteBoardItem.Create(
- Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], board );
- end;
- CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard);
- CurrentNode.ImageIndex := 15;
- CurrentNode.SelectedIndex := 15;
- end else if Node.Attributes['favtype'] = 'thread' then begin
- // \8b\8c\8e®\82Ì\82¨\8bC\82É\93ü\82è\82Æ\82Ì\8cÝ\8a·\90«\82Ì\82½\82ß
- if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin
- board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
- if board = nil then
- Exit;
-
- if not board.IsThreadDatRead then
- GikoSys.ReadSubjectFile( board );
- threadItem := board.Find( Node.Attributes[ 'thread' ] );
- if threadItem = nil then begin
- threadItem := TThreadItem.Create(
- board.BoardPlugIn,
- GikoSys.Get2chBoard2ThreadURL( board, ChangeFileExt( Node.Attributes[ 'thread' ], '' ) ) );
- threadItem.Title := Node.Attributes[ 'title' ];
- board.Add( threadItem );
+ try
+ ParentNode := FStack.Peek;
+ if TObject(ParentNode.Data) is TFavoriteFolder then begin
+ if Node.Attributes['favtype'] = 'board' then begin
+ // \8b\8c\8e®\82Ì\82¨\8bC\82É\93ü\82è\82Æ\82Ì\8cÝ\8a·\90«\82Ì\82½\82ß
+ if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin
+ board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
+ if board <> nil then
+ FavBoard := TFavoriteBoardItem.Create(
+ board.URL, Node.Attributes[ 'title' ], board );
+ end else begin
+ FavBoard := TFavoriteBoardItem.Create(
+ Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], board );
end;
- FavThread := TFavoriteThreadItem.Create(
- threadItem.URL, Node.Attributes[ 'title' ], threadItem );
- end else begin
- FavThread := TFavoriteThreadItem.Create(
- Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], threadItem );
+ CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard);
+ CurrentNode.ImageIndex := 15;
+ CurrentNode.SelectedIndex := 15;
+ end else if Node.Attributes['favtype'] = 'thread' then begin
+ // \8b\8c\8e®\82Ì\82¨\8bC\82É\93ü\82è\82Æ\82Ì\8cÝ\8a·\90«\82Ì\82½\82ß
+ if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin
+ board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
+ if board = nil then
+ Exit;
+
+ if not board.IsThreadDatRead then
+ GikoSys.ReadSubjectFile( board );
+ threadItem := board.Find( Node.Attributes[ 'thread' ] );
+ if threadItem = nil then begin
+ threadItem := TThreadItem.Create(
+ board.BoardPlugIn,
+ GikoSys.Get2chBoard2ThreadURL( board, ChangeFileExt( Node.Attributes[ 'thread' ], '' ) ) );
+ threadItem.Title := Node.Attributes[ 'title' ];
+ board.Add( threadItem );
+ end;
+ FavThread := TFavoriteThreadItem.Create(
+ threadItem.URL, Node.Attributes[ 'title' ], threadItem );
+ end else begin
+ FavThread := TFavoriteThreadItem.Create(
+ Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], threadItem );
+ end;
+ CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread);
+ CurrentNode.ImageIndex := 16;
+ CurrentNode.SelectedIndex := 16;
end;
- CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread);
- CurrentNode.ImageIndex := 16;
- CurrentNode.SelectedIndex := 16;
end;
+ except
+ // \82±\82Ì\83A\83C\83e\83\80\82Å\96â\91è\82ª\8bN\82«\82Ä\82à\91¼\82Ì\83A\83C\83e\83\80\82É\89e\8b¿\82ð\97^\82¦\82½\82\82È\82¢\82Ì\82Å
end;
end;
end;