public bool removeItem(PackageItem item) { var ls = item.locations(); if (!ls.Contains(this)) { return false; } mItems.Remove(item); ls.Remove(this); return true; }
//if true, it is in package /// methods public bool addItem(PackageItem item) { var ls = item.locations(); if (!ls.Contains(this)) { mItems.Add(item); ls.Add(this); return true; } else { return false; } }