private void loginButton_Click(object sender, EventArgs e) { if (loginButton.Text == "Login") { this.Hide(); login login = new login(); login.Show(); } else { usernameLabel.Text = " "; myAccount acc = new myAccount(); acc.logout(); myAccountLabel.Visible = false; loginButton.Text = "Login"; adminButton.Visible = false; linkLabel1.Visible = false; } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { myAccount myacc = new myAccount(usernameLabel.Text); myacc.Show(); }