コード例 #1
0
ファイル: Form1.cs プロジェクト: fakeshark/CSharpProjects
 private CustomerList MakeCustomerList(Customer c, int count)
 {
     CustomerList customerList = new CustomerList();
     for (int i = 0; i < count; i++)
     {
         Customer cust = (Customer)c.Clone();
         customerList.Add(cust);
     }
     return customerList;
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: fakeshark/CSharpProjects
 private void btnClone_Click(object sender, System.EventArgs e)
 {
     if (IsValidData())
     {
         int count = Convert.ToInt16(txtCopies.Text);
         customers = MakeCustomerList(customer, count);
         lstCustomers.Items.Clear();
         foreach (Customer c in customers)
         {
             lstCustomers.Items.Add(c.GetDisplayText());
         }
     }
 }
コード例 #3
0
 public void HandleChanged(CustomerList customerList)
 {
     // Is not supposed to do anything - its just so one event is bound already - so we dont have to
     // check if we're already bound, or deal with other things that may be bound. - In the future tho that
     // would probably be better etiquette.
 }