public bool AddItem(SampleDataItem tile) { if (!itemsCore.Contains(tile)) { itemsCore.Add(tile); return(true); } return(false); }
public bool AddItem(SampleDataItem tile) { if (tile == null) { return(false); } string groupName = tile.GroupName == null ? "" : tile.GroupName; SampleDataGroup thisGroup = GetGroup(groupName); if (thisGroup == null) { thisGroup = new SampleDataGroup(groupName); groupsCore.Add(thisGroup); } return(thisGroup.AddItem(tile)); }