예제 #1
0
        int CompareByWeight(IFitting f1, IFitting f2)
        {
            if (f1.Weight < f2.Weight)
            return 1;

              if (f1.Weight > f2.Weight)
            return -1;

              return 0;
        }
예제 #2
0
        public bool Add(IFitting item)
        {
            Box b = item as Box;
              if (b != null)
              {
            foreach (Box old in Boxes)
              if (old.Id == b.Id)
            return false;

            Boxes.Add(b);
              }
              return true;
        }