コード例 #1
0
 /// <summary>
 /// 显示身份证信息事件
 /// </summary>
 /// <param name="isSeccessed">读卡成功</param>
 /// <param name="filePath">文件路径,默认空串</param>
 private void infoWrite(bool isSeccessed, string filePath = "")
 {
     try
     {
         lbID.Content     = isSeccessed ? IdAddStar(info.PeopleIDCode) : string.Empty;
         lbName.Content   = isSeccessed ? info.PeopleName : string.Empty;
         lbAdress.Content = isSeccessed ? info.PeopleAddress : string.Empty;
         lbDate.Content   = isSeccessed ? info.StartDate + "-" + info.EndDate : string.Empty;
         lbDepart.Content = isSeccessed ? info.Department : string.Empty;
         lbNation.Content = isSeccessed ? info.PeopleNation : string.Empty;
         lbSex.Content    = isSeccessed ? info.PeopleSex : string.Empty;
         lbBirth.Content  = isSeccessed ? info.PeopleBirthday : string.Empty;
         isCrvChecked     = isSeccessed;
         if (isSeccessed)
         {
             if (image1.Source != null)
             {
                 image1.Source = null;
             }
             image1.Source = string.IsNullOrWhiteSpace(filePath) ? CommonUtil.BitmapToBitmapImage(info.bitmap) : CommonUtil.BitmapToBitmapImage(filePath);
         }
         else
         {
             image1.Source = null;
         }
     }
     catch (Exception ex)
     {
         LogUtil.LogInfo(GetType(), ex);
     }
 }