private void metroButton1_Click(object sender, EventArgs e) { this.Hide(); NewUserForm newUserForm = new NewUserForm(); newUserForm.PropertyChanged += NewUserChanged; newUserForm.Show(); }
public void NewUserChanged(object o, PropertyChangedEventArgs e) { if (o != null) { if (e.PropertyName == "Success") { NewUserForm newUserForm = (NewUserForm)o; newUserForm.Close(); this.Show(); } else { if (this.Visible == false) { this.Show(); } } } }