public void AddProductGroup(CraftableGroup <Product> group) { CraftableGroup <Product> duplicate = ProductGroups.Find(pg => pg.Name.Equals(group.Name)); if (duplicate != null) { Console.WriteLine("ProductGroup not added. Trying to add ProductGroup with duplicate Name. Did you mean to update?"); Console.WriteLine("Conflicting Groups:\nName: {0}\nName: {2}", group.Name, duplicate.Name); return; } ProductGroups.Add(group); }
public void AddListingGroup(CraftableGroup <Listing> group) { CraftableGroup <Listing> duplicate = ListingGroups.Find(li => li.Name.Equals(group.Name)); if (duplicate != null) { Console.WriteLine("ListingGroup not added. Trying to add ListingGroup with duplicate Name. Did you mean to update?"); Console.WriteLine("Conflicting Groups:\nName: {0}\nName: {2}", group.Name, duplicate.Name); return; } ListingGroups.Add(group); }
public void RemoveProductGroup(CraftableGroup <Product> group) { ProductGroups.Remove(group); }
public void RemoveListingGroup(CraftableGroup <Listing> group) { ListingGroups.Remove(group); }