begin
for i := Count - 1 downto 0 do
Delete(i);
+ Capacity := Count;
end;
function TBBS.Find(key: string): TCategory;
begin
for i := Count - 1 downto 0 do
Delete(i);
+ Capacity := Count;
end;
function TCategory.FindName(key: string): TBoard;
// FUnRead := 0;
for i := Count - 1 downto 0 do
Delete(i);
+ Capacity := Count;
end;
function TBoard.Find(ItemFileName: string): TThreadItem;
// procedure SetStdToolBar;
// function GetAction(ActionName: string): TContainedAction;
procedure SetLinkBar;
+ procedure ClearLinkBar;
function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
procedure MenuBarChevronMenu;
procedure LinkBarChevronMenu;
except
end;
-
+ try
+ ClearLinkBar;
+ except
+ end;
// FDownload.Free;
try
TreeView.Items.Clear;
except
end;
+ try
+ FavoriteTreeView.Items.Clear;
+ except
+ end;
try
if FavoriteDM <> nil then
procedure TGikoForm.WndProc(var Message: TMessage);
begin
- if (Message.Msg = CM_DIALOGCHAR) then
- if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
- Exit;
- inherited;
+ try
+ if (Message.Msg = CM_DIALOGCHAR) then
+ if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
+ Exit;
+ inherited;
+ except
+ end;
end;
procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
MainCoolBar.Bands.EndUpdate;
end;
end;
-
+procedure TGikoForm.ClearLinkBar;
+var
+ i: Integer;
+begin
+ MainCoolBar.Bands.BeginUpdate;
+ try
+ LinkBarPopupMenu.Items.Clear;
+ for i := LinkToolBar.ButtonCount - 1 downto 0 do
+ LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
+ finally
+ MainCoolBar.Bands.EndUpdate;
+ end;
+end;
procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
var
Node: TTreeNode;
TRoundItem(FBoardList[i]).Free;
FBoardList.Delete(i);
end;
+ FBoardList.Capacity := FBoardList.Count;
for i := FItemList.Count - 1 downto 0 do begin
if FItemList[i] <> nil then
TRoundItem(FItemList[i]).Free;
FItemList.Delete(i);
end;
+ FItemList.Capacity := FItemList.Count;
end;
function TRoundList.Find(Board: TBoard): Integer;
errorSl.SaveToFile(errorFileName);
end;
finally
+ errorSl.Free;
sl.Free;
// boardList.Free;
end;