private void AddCustomer(object sender, RoutedEventArgs e) { var customer = new Customer { Name = $"Dame {_count++}" }; CustomerList.AddCustomer(customer); }
public void TestInitialize() { CustomerList CustList = new CustomerList(); Customer Cust; StringBuilder CustListString = new StringBuilder(); for (int i = 0; i < 10; i++) { Cust = new Customer(i, "Vorname" + i.ToString(), "Nachname" + i.ToString(), new Email("Email" + i.ToString() + "@com.at"), new Address("Street" + i, i.ToString(), i + i, "City" + i)); CustList.AddCustomer(this, new EventArgsCustomerChange(Cust)); CustListString.AppendLine(i + "; " + "Vorname" + i.ToString() + "; " + "Nachname" + i.ToString() + "; " + "Email" + i.ToString() + "@com.at" + "; " + "Street" + i + "; " + i + "; " + i + i + "; " + "City" + i); } }
public Bank(UIHelper uiHelper, CancellationToken cancelToken, BankSimulator bankSimulator, int numTellers, int numCustomers, decimal customerBalance, decimal bankBalance, decimal customerGoal) { this.CustomerGoal = customerGoal; this.BankSim = bankSimulator; // create customers in list, vault, queue, generator, tellers in list Customers = new CustomerList(numCustomers); for (int i = 0; i < numCustomers; i++) { Customers.AddCustomer(new Customer(String.Format("Customer{0}", i), customerBalance)); } Vault = new BankVault(bankBalance); Queue = new BankQueue(numCustomers - 1); for (int i = 0; i < numTellers; i++) { Tellers.Add(new Teller(uiHelper, cancelToken, this)); } }