public void SetupVocalDispatchAPI(string eventtohandle, VocalDispatchEventDelegate specifiedsafeeventhandler) { //Setup our notification function and tell VocalDispatch to call it when it hears the appropriate phrase safeeventhandler = specifiedsafeeventhandler; vocaldispatchapiguid = VocalDispatch.APIv1.RegisterEventHandler(eventtohandle, new VocalDispatch.APIv1.VocalDispatchPhraseNotificationEventHandlerFunction(MiddleManEventHandler)); }
public void ReleaseVocalDispatchAPI() { if (vocaldispatchapiguid != Guid.Empty) { VocalDispatch.APIv1.UnregisterEventHandler(vocaldispatchapiguid); } safeeventhandler = null; vocaldispatchapiguid = Guid.Empty; }