private void OnEventCallback( ReaPi.ResponseHandle response, ReaPi.ConnectionIdentifier connection, ReaPi.EEventId eventId, IntPtr context) { int error = 0; SendToDashboard(MessageType.EVENT, $"{eventId.ToString()}", null, null); switch (eventId) { case ReaPi.EEventId.JOBSET: OnJobSetEvent(connection, ReaPi.GetJobId(response, out error), ReaPi.GetJobFilename(response, out error)); break; case ReaPi.EEventId.JOBSTARTED: OnJobStartedEvent(); break; case ReaPi.EEventId.JOBSTOPPED: OnJobStoppedEvent(); break; case ReaPi.EEventId.PRINTTRIGGER: OnJobPrintTriggerEvent(eventId); break; case ReaPi.EEventId.PRINTSTART: OnJobPrintStartEvent(eventId); break; case ReaPi.EEventId.PRINTREJECTED: OnJobPrintRejectEvent(); break; case ReaPi.EEventId.PRINTEND: OnJobPrintEndEvent(); break; case ReaPi.EEventId.PRINTABORTED: OnJobPrintAbortedEvent(); break; case ReaPi.EEventId.PRINTSPEEDERROR: OnJobPrintSpeedErrorEvent(); break; case ReaPi.EEventId.INVALIDCONTENT: OnInvalidContentEvent(ReaPi.GetGroupname(response, out error)); break; case ReaPi.EEventId.IOCONFIGURATIONSET: OnIOConfigurationSetEvent(ReaPi.GetIOConfigurationFilename(response, out error)); break; case ReaPi.EEventId.MISSINGCONTENT: OnMissingContentEvent(ReaPi.GetGroupname(response, out error)); break; case ReaPi.EEventId.BUFFERFULL: OnJobBufferFullEvent(ReaPi.GetJobErrorStatus(response, out error)); break; default: break; } }