private void mp_StatusChangedEvent(object sender, StatusChangedEventArgs e) { Invoke((MethodInvoker)delegate { if (e.Status.Equals("[ACTION] HIDE_STATUS_LABEL")) { HideStatusLabel(); return; } if (e.Status.Equals("[ERROR] FAILED_TO_OPEN")) { MessageBox.Show("Baka MPlayer couldn't open this file.\nThis can happen if the file is not supported, incomplete, or inaccessible.", "Cannot open file", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); SetStatusMsg("Open a file to begin playing", true); return; } SetStatusMsg(e.Status, e.AutoHide); }); }
protected virtual void OnStatusChanged(StatusChangedEventArgs e) { if (StatusChangedEvent != null) { StatusChangedEvent(this, e); } }