public static ProfileForm GetInstance(int profileId) { if (instance == null) { return(instance = new ProfileForm(profileId)); } return(null); }
private void ViewProfileButton_Click(object sender, EventArgs e)//Goes to profile View { ProfileForm.GetInstance(profileId).Show(); }
private void ProfileForm_Closing(object sender, CancelEventArgs e)//on close event { instance = null; }
private void Back_btn_Click(object sender, EventArgs e) { Close(); instance = null; }