void EventCallback(MMM.Readers.FullPage.EventCode aEventType) { try { switch (aEventType) { case MMM.Readers.FullPage.EventCode.SETTINGS_INITIALISED: { // You may wish to change the settings immediately after they have // been loaded - for example, to turn off options that you do not // want. MMM.Readers.FullPage.ReaderSettings settings; MMM.Readers.ErrorCode errorCode = MMM.Readers.FullPage.Reader.GetSettings( out settings ); if (errorCode == MMM.Readers.ErrorCode.NO_ERROR_OCCURRED) { /* if (settings.puCameraSettings.puSplitImage == false) * this.tabControl.Controls.Remove(this.ImagesRearTab);*/ settings.puDataToSend.send |= MMM.Readers.FullPage.DataSendSet.Flags.DOCMARKERS; settings.puDataToSend.special = MMM.Readers.FullPage.DataSendSet.Flags.VISIBLEIMAGE; } else { MessageBox.Show( "GetSettings failure, check for Settings " + "structure mis-match. Error: " + errorCode.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error ); } break; } case MMM.Readers.FullPage.EventCode.START_OF_DOCUMENT_DATA: { msgsplash.Text = "Leyendo información..."; break; } } } catch (Exception e) { MessageBox.Show(e.Message); } }
// Thread helper callback to make sure data is received on the correct thread. private void ProcessEventThreadHelper(MMM.Readers.FullPage.EventCode aEventCode) { if (_threadHelperControl.InvokeRequired) { _threadHelperControl.Invoke( new MMM.Readers.FullPage.EventDelegate(ProcessEvent), new object[] { aEventCode } ); } else { ProcessEvent(aEventCode); } }
void EventCallbackThreadHelper(MMM.Readers.FullPage.EventCode aEventType) { if (_threadHelperControl.InvokeRequired) { _threadHelperControl.Invoke( new MMM.Readers.FullPage.EventDelegate(EventCallback), new object[] { aEventType } ); } else { EventCallback(aEventType); } }
private void DeviceEventHanlder(MMM.Readers.FullPage.EventCode aEventType) { log.DebugFormat("Device Event [{0}]", aEventType); }
public ScanSourceEvent(MMM.Readers.FullPage.EventCode eventCode) { EventType = ScanSourceEventType.DEVICE_EVENT; EventCode = eventCode; ErrorMessage = null; }
private void ProcessEvent(MMM.Readers.FullPage.EventCode aEventCode) { InsertRow((int)aEventCode, aEventCode.ToString(), 0, string.Empty, RowType.Event); }
private void DeviceEventHandler(MMM.Readers.FullPage.EventCode eventCode) { NotifyListeners(new ScanSourceEvent(eventCode)); }