Пример #1
0
 public Trip(Client client, AdditionalDemand additionalDemand, Address startPoint, Address endPoint)
 {
     this.AdditionalDemand = additionalDemand;
     this.Client           = client;
     this.StartAdress      = startPoint;
     this.EndAdress        = endPoint;
     this.State            = TripStates.New;
     TripStarted          += Driver.OnTripStart;
     TripEnded            += Driver.OnTripEnd;
     TripInicializate     += Trip.OnTripInicializate;
     TripEnded            += Trip.OnTripEnd;
     this.TripInicializate(this, EventArgs.Empty);
 }
Пример #2
0
 public static float MoneyEarnedPerDay(int tripRate, int TravelTime, AdditionalDemand additionalDemand)
 {
     Trip.Money += ((int)tripRate * TravelTime + (int)additionalDemand);
     return(Trip.Money);
 }