Beispiel #1
0
 public void AddRoutewayCredit(Routeway routeway, int credit)
 {
     foreach (SupplyingRoutewayPack pack in this.SupplyingRouteways)
     {
         if (pack.SupplyingRouteway == routeway)
         {
             pack.Credit += credit;
             return;
         }
     }
     SupplyingRoutewayPack item = new SupplyingRoutewayPack();
     item.SupplyingRouteway = routeway;
     item.Credit = credit;
     this.SupplyingRouteways.Add(item);
 }
Beispiel #2
0
        public void AddRoutewayCredit(Routeway routeway, int credit)
        {
            foreach (SupplyingRoutewayPack pack in this.SupplyingRouteways)
            {
                if (pack.SupplyingRouteway == routeway)
                {
                    pack.Credit += credit;
                    return;
                }
            }
            SupplyingRoutewayPack item = new SupplyingRoutewayPack();

            item.SupplyingRouteway = routeway;
            item.Credit            = credit;
            this.SupplyingRouteways.Add(item);
        }