| Unlock;
end;
end;
procedure TBag.Change;
begin
if not Locked then
if Assigned(FOnChange) then FOnChange(Self);
end;
procedure TBag.SetLocking(Updating: Boolean);
begin
if Updating then { Bag has become unlocked }
Change;
end;
Delphi实例:TString、TstringList
TStrings = class(TPersistent)
private
FUpdateCount: Integer;
Protected
procedure Exchange(Index1, Index2: Integer); virtual;
procedure SetUpdateState(Updating: Boolean); virtual;
public
procedure BeginUpdate;
procedure EndUpdate;
procedure Changed; virtual;
procedure Changing; virtual;
上一页 [1] [2] |