void videoForm_FormClosed(object sender, FormClosedEventArgs e) { if (videoForm != null) { videoForm.Dispose(); videoForm = null; } }
void showVideo(VideoEventArgs e) { if (videoForm == null) { videoForm = new VideoForm(airplay, e.SessionId); videoForm.FormClosed += videoForm_FormClosed; videoForm.Show(); } videoForm.LoadVideo(e); }