Beispiel #1
0
        /// <summary>
        /// 解析照片信息
        /// </summary>
        /// <param name="fileDirectory">照片信息所属目录</param>
        /// <returns>BMP照片路径</returns>
        protected override IDCardActionResult ParsePhotoInfoInternal(string fileDirectory)
        {
            var photoFilePath = IOHelper.GetFilePath(fileDirectory, DefaultPhotoFileName);

            var interopHandler = GetInteropHandler();

            return(interopHandler.ExecIDCardInteropAction((port) => SynjonesIDCardInteropAction.GetBmp(port, photoFilePath)));
        }
Beispiel #2
0
        /// <summary>
        /// 读最新地址信息
        /// </summary>
        /// <param name="fileDirectory">文件输出目录</param>
        /// <returns></returns>
        protected override IDCardActionResult ReadNewAddressInfoInternal(string fileDirectory)
        {
            var newAddressFilePath = IOHelper.GetFilePath(fileDirectory, DefaultNewAddressFileName);

            using (var interopHandler = GetInteropReadHandler())
            {
                return(interopHandler.ExecIDCardInteropReadAction(
                           (port) => SynjonesIDCardInteropAction.ReadNewAppMsg(port, false, newAddressFilePath)));
            }
        }
Beispiel #3
0
        /// <summary>
        /// 读文字和相片信息
        /// </summary>
        /// <param name="fileDirectory">文件输出目录</param>
        /// <returns></returns>
        protected override IDCardActionResult ReadBaseTextPhotoInfoInternal(string fileDirectory)
        {
            var txtFilePath   = IOHelper.GetFilePath(fileDirectory, DefaultTextFileName);
            var photoFilePath = IOHelper.GetFilePath(fileDirectory, DefaultPhotoFileName);

            using (var interopHandler = GetInteropReadHandler())
            {
                return(interopHandler.ExecIDCardInteropReadAction(
                           (port) => SynjonesIDCardInteropAction.ReadBaseMsg(port, false, txtFilePath, photoFilePath)));
            }
        }