示例#1
0
 public bool AddItem(SampleDataItem tile)
 {
     if (!itemsCore.Contains(tile))
     {
         itemsCore.Add(tile);
         return(true);
     }
     return(false);
 }
示例#2
0
        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));
        }