private void button2_Click(object sender, EventArgs e) { CustomerLogin co = new CustomerLogin(); this.Hide(); co.Show(); }
private void button1_Click(object sender, EventArgs e) { CustomerLogin lo = new CustomerLogin(); Customer ca = new Customer(); c.email = textBox1.Text; c.passward = textBox2.Text; c.name = textBox3.Text; c.address = textBox4.Text; c.Creditcard = textBox6.Text; c.phone = textBox5.Text; MessageBox.Show("Thanks for registration !! press ok to login ^^"); f.Add(c); if (File.Exists("customer.txt")) { FileStream FS = new FileStream("customer.txt", FileMode.Append); BinaryFormatter k = new BinaryFormatter(); for (int i = 0; i < f.Count(); i++) { k.Serialize(FS, f[i]); } FS.Close(); } this.Close(); ca.Hide(); lo.Show(); }