Changeset 344 for trunk/Forms/FormList.pas
- Timestamp:
- Dec 23, 2024, 8:16:05 AM (10 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormList.pas
r317 r344 46 46 Selected: Boolean); 47 47 private 48 FList: TItemList;49 procedure SetList(AValue: TItemList);48 FList: IList<TItem>; 49 procedure SetList(AValue: IList<TItem>); 50 50 procedure UpdateListViewColumns; 51 51 public … … 54 54 procedure UpdateInterface; 55 55 procedure UpdateList; 56 property List: TItemListread FList write SetList;56 property List: IList<TItem> read FList write SetList; 57 57 end; 58 58 … … 98 98 if Assigned(ListView1.Selected) then 99 99 with TItem(ListView1.Selected.Data) do begin 100 TempEntry := List.Create Item;100 TempEntry := List.CreateBaseItem; 101 101 TempEntry.Assign(TItem(ListView1.Selected.Data)); 102 102 FormItem := TFormItem.Create(Self); … … 122 122 if (MaxItemCount <> -1) and (List.Count >= MaxItemCount) then Exit; 123 123 124 TempEntry := List.Create Item;124 TempEntry := List.CreateBaseItem; 125 125 FormItem := TFormItem.Create(Self); 126 126 try 127 TempEntry.Name := List.GetNextAvailableName(SNew + ' ' + LowerCase(List.Get ItemClass.GetClassName));127 TempEntry.Name := List.GetNextAvailableName(SNew + ' ' + LowerCase(List.GetName)); 128 128 FormItem.Item := TempEntry; 129 129 if FormItem.ShowModal = mrOk then begin … … 146 146 if (MaxItemCount <> -1) and (List.Count >= MaxItemCount) then Exit; 147 147 148 TempEntry := List.Create Item;148 TempEntry := List.CreateBaseItem; 149 149 TempEntry.Assign(TItem(ListView1.Selected.Data)); 150 150 FormItem := TFormItem.Create(Self); … … 219 219 //Item.Caption := GetName; 220 220 Item.Data := List[Item.Index]; 221 Fields := List.GetItem Class.GetFields;221 Fields := List.GetItemFields; 222 222 try 223 223 for I := 0 to Fields.Count - 1 do begin … … 250 250 end; 251 251 252 procedure TFormList.SetList(AValue: TItemList);252 procedure TFormList.SetList(AValue: IList<TItem>); 253 253 begin 254 254 if FList = AValue then Exit; … … 261 261 Fields: TItemFields; 262 262 begin 263 Fields := List.GetItem Class.GetFields;263 Fields := List.GetItemFields; 264 264 ListView1.Columns.BeginUpdate; 265 265 try
Note:
See TracChangeset
for help on using the changeset viewer.