Example #1
0
 public bool removeItem(PackageItem item)
 {
     var ls = item.locations();
      if (!ls.Contains(this))
      {
          return false;
      }
     mItems.Remove(item);
     ls.Remove(this);
     return true;
 }
Example #2
0
 //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;
     }
 }