Esempio n. 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     eshop = new Eshop(listBox1, listBox2, listBox3, label1);
     eshop.add_product(new Product("ananas", 24, 15.3));
     eshop.add_product(new Product("dřevo", 8, 12));
     eshop.add_product(new Product("klíč", 7, 5));
     eshop.add_product(new Product("auto", 2, 40000));
     eshop.add_product(new Product("brokolice", 1, 0.5));
     eshop.add_user(new User("pepa", "*****@*****.**"));
     eshop.show_users();
     eshop.show_products();
     eshop.show_basket();
 }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     shop.add_user(new User(textBox2.Text, textBox1.Text));
     shop.show_users();
 }