public static YTForm GetInstance(int profileId, Form chatForm) { if (instance == null) { instance = new YTForm(profileId, chatForm); } return(instance); }
private void YTForm_Closing(object sender, CancelEventArgs e)//on close event { instance = null; }
private void YoutubeButton_Click(object sender, EventArgs e)//Goes to Youtube View { YTForm.GetInstance(profileId, this).Show(); }