コード例 #1
0
ファイル: PcscService.cs プロジェクト: Jerlag01/Point-Of-Sale
 public string GetCardId()
 {
     return(PcscService.ByteArrayToString((ICollection <byte>) this.SendApdu(new byte[5]
     {
         byte.MaxValue,
         (byte)202,
         (byte)0,
         (byte)0,
         (byte)0
     })));
 }
コード例 #2
0
 public void Inititialize(PcscService service, int authenticationTimeout)
 {
     this.AuthTimer                 = new Timer((double)authenticationTimeout);
     this.AuthTimer.AutoReset       = false;
     this.AuthTimer.Elapsed        += new ElapsedEventHandler(this.TimeElapsed);
     this.PcscService               = service;
     this.PcscService.CardInserted += new EventHandler(this.SmartcardInserted);
     this.PcscService.CardRemoved  += new EventHandler(this.SmartcardRemoved);
     if (this.PcscService.CardPresent && !string.IsNullOrEmpty(this.PcscService.CardId))
     {
         this.SmartcardInserted((object)null, EventArgs.Empty);
     }
     this.SuspendService = false;
 }