public static void OnMediaError(object sender, EventArgs e) { if (PlayerForm != null && PlayerForm.IsDisposed == false) { PlayerForm.Invoke(new Action(() => { PlayerForm.OnMediaError(sender, e); })); } }