//\83q\83X\83g\83\8a\83\8a\83X\83g\95Û\91¶
try
SaveHistory;
- //ClearHistory;
+ ClearHistory;
except
end;
i : Integer;
begin
//FHistoryList.Clear;
+
try
for i := FHistoryList.Count - 1 downto 0 do begin
- TFavoriteThreadItem( FHistoryList[ i ] ).Free;
- //FHistoryList.Delete(i);
+ if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
+ TFavoriteThreadItem(FHistoryList[ i ]).Free
+ else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
+ TFavoriteBoardItem(FHistoryList[ i ]).Free;
+
+ //FHistoryList.Delete(i);
end;
except
end;
+
FHistoryList.Clear;
FHistoryList.Capacity := FHistoryList.Count;
Items : ^TTreeNodes;
ItemURL : string;
Data : Pointer;
- sT : Cardinal;
- eT : Cardinal;
begin
Items := @(FavoriteTreeView.Items);
Item := TFavoriteBoardItem( Item ).Item
else if Item is TFavoriteThreadItem then
Item := TFavoriteThreadItem( Item ).Item;
- sT := GetTickCount;
if Item is TBoard then begin
ItemURL := TBoard( Item ).URL;
for i := Items^.Count - 1 downto 0 do begin
end;
end;
end;
- eT := GetTickCount;
Dlg := TFavoriteAddDialog.Create(Self);
try
Dlg.SetBoard( TBoard( Item ) );
end;
end;
end;
- eT := GetTickCount;
Dlg := TFavoriteAddDialog.Create(Self);
try
Dlg.SetThreadItem( TThreadItem( Item ) );
end;
SetLinkBar;
- ShowMessage(IntToStr(eT-sT));
end;
procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);