Changeset 346 for trunk/ServerList.pas
- Timestamp:
- Dec 25, 2024, 11:04:56 AM (27 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ServerList.pas
r317 r346 23 23 end; 24 24 25 { TServerInfos } 26 25 27 TServerInfos = class(TObjectList<TServerInfo>) 28 procedure Assign(Source: TServerInfos); 26 29 end; 27 30 … … 64 67 end; 65 68 69 { TServerInfos } 70 71 procedure TServerInfos.Assign(Source: TServerInfos); 72 var 73 I: Integer; 74 begin 75 while Count > Source.Count do 76 Delete(Count - 1); 77 while Count < Source.Count do 78 Add(TServerInfo.Create); 79 for I := 0 to Count - 1 do begin 80 Items[I].Assign(Source.Items[I]); 81 end; 82 end; 83 66 84 { TServerList } 67 85 68 86 procedure TServerList.Assign(Source: TServerList); 69 var70 I: Integer;71 87 begin 72 while Items.Count > Source.Items.Count do 73 Items.Delete(Items.Count - 1); 74 while Items.Count < Source.Items.Count do 75 Items.Add(TServerInfo.Create); 76 for I := 0 to Items.Count - 1 do begin 77 Items[I].Assign(Source.Items[I]); 78 end; 88 Name := Source.Name; 89 Address := Source.Address; 90 Items.Assign(Source.Items); 79 91 end; 80 92
Note:
See TracChangeset
for help on using the changeset viewer.