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