示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public void RemoveProductGroup(CraftableGroup <Product> group)
 {
     ProductGroups.Remove(group);
 }
示例#4
0
 public void RemoveListingGroup(CraftableGroup <Listing> group)
 {
     ListingGroups.Remove(group);
 }