示例#1
0
        private void LoadSwipeSettings(ref MMM.Readers.Modules.Swipe.SwipeSettings swipeSettings)
        {
            MMM.Readers.ErrorCode lErrorCode = MMM.Readers.Modules.Reader.LoadSwipeSettings(
                ref swipeSettings
                );

            if (lErrorCode != MMM.Readers.ErrorCode.NO_ERROR_OCCURRED)
            {
                String message = String.Format("Failed to Load Swipe Settings {0} {1}", (int)lErrorCode, lErrorCode.ToString());
                log.Warn(message);
                throw new PosHardwareException(message);
            }
        }
        private void InitializeSwipeReader(
            MMM.Readers.Modules.Swipe.SwipeSettings swipeSettings,
            MMM.Readers.Modules.Swipe.DataDelegate dataDelegate,
            MMM.Readers.FullPage.EventDelegate eventDelegate
            )
        {
            log.Debug("Initialize Swipe Reader with settings : [" + swipeSettings + "]");

            MMM.Readers.ErrorCode lErrorCode = MMM.Readers.Modules.Swipe.Initialise(
                swipeSettings,
                dataDelegate,
                eventDelegate);
            if (lErrorCode != MMM.Readers.ErrorCode.NO_ERROR_OCCURRED)
            {
                String message = String.Format("Failed SwipeReader Initialization {0} {1}", (int)lErrorCode, lErrorCode.ToString());
                throw new PosHardwareException(message);
            }
        }