示例#1
0
 public bool Equals(ItemTypeModel other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.ItemType, ItemType));
 }
示例#2
0
 public bool Equals(ItemTypeModel other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.ItemType, ItemType);
 }
示例#3
0
        private void RemoveItem(ItemTypeModel itemTypeModel)
        {
            foreach (var paragraph in Paragraphs)
            {
                var toRemove = paragraph.RecievedItems.Where(item => item.BasicItem.Equals(itemTypeModel)).ToList();
                foreach (var item in toRemove)
                {
                    paragraph.RecievedItems.Remove(item);
                }
            }

            foreach (var edge in Edges)
            {
                // TODO: Finish
                //edge.RecievedItems.RemoveAll(item => item.BasicItem == itemTypeModel);
                //edge.RequestedItems.RemoveAll(item => item.BasicItem == itemTypeModel);
            }

            Items.Remove(itemTypeModel);
        }
示例#4
0
 public ItemUnitModel(ItemUnit itemUnit)
 {
     ItemUnit        = itemUnit;
     m_ItemTypeModel = new ItemTypeModel(itemUnit.BasicItem);
 }
示例#5
0
 public ItemUnitModel(ItemUnit itemUnit)
 {
     ItemUnit = itemUnit;
     m_ItemTypeModel = new ItemTypeModel(itemUnit.BasicItem);
 }