private void pictureBox2_Click(object sender, EventArgs e) { Dashboard_area obj = new Dashboard_area(); this.Hide(); obj.Show(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == null && textBox2.Text == null) { MessageBox.Show("Please Enter Details"); } else { string a = textBox1.Text + ".txt"; if (File.Exists(a)) { string[] arr = File.ReadAllLines(a); if (textBox2.Text == arr[1]) { ForUser.currentuser = textBox1.Text;//passing data for current user Dashboard_area dsa = new Dashboard_area(); dsa.Show(); this.Hide(); } } } }