private void btnTaxi_Click(object sender, RoutedEventArgs e) { var vehicle = new Taxi { Fares = _random.Next(1, 8) }; var inbound = _random.NextBool(); TollSystem.AddEntry(vehicle, GenerateTimeStamp(), inbound, GenerateLicense()); }
private void btnDeliveryTruck_Click(object sender, RoutedEventArgs e) { var vehicle = new DeliveryTruck { GrossWeightClass = _random.Next(1000, 10000) }; var inbound = _random.NextBool(); TollSystem.AddEntry(vehicle, GenerateTimeStamp(), inbound, GenerateLicense()); }
private void btnBus_Click(object sender, RoutedEventArgs e) { var capacity = _random.Next(1, 6); var riders = _random.Next(1, capacity); var vehicle = new Bus { Capacity = capacity, Riders = riders }; var inbound = _random.NextBool(); TollSystem.AddEntry(vehicle, GenerateTimeStamp(), inbound, GenerateLicense()); }
private void btnNull_Click(object sender, RoutedEventArgs e) { TollSystem.AddEntry(null, DateTime.Now, false, null); }