コード例 #1
0
ファイル: Form1.cs プロジェクト: 12019/svn.gov.pt
    private string Load_eid(PTEID_ReaderContext Reader)
    {
        string sText;
        PTEID_EIDCard card;
        card = Reader.getEIDCard();
        if(card.isTestCard())
        {
            card.setAllowTestCard(true);
        }

        PTEID_EId doc;
        doc = card.getID();

        sText = "";
        sText += "PERSONAL DATA" + "\r\n";
        sText += "\r\n";
        sText += "First Name = " + doc.getFirstName() + "\r\n";
        sText += "Last Name = " + doc.getSurname() + "\r\n";
        sText += "Gender = " + doc.getGender() + "\r\n";
        sText += "DateOfBirth = " + doc.getDateOfBirth() + "\r\n";
        sText += "LocationOfBirth = " + doc.getLocationOfBirth() + "\r\n";
        sText += "Nobility = " + doc.getNobility() + "\r\n";
        sText += "Nationality = " + doc.getNationality() + "\r\n";
        sText += "NationalNumber = " + doc.getNationalNumber() + "\r\n";
        sText += "SpecialOrganization = " + doc.getSpecialOrganization() + "\r\n";
        sText += "MemberOfFamily = " + doc.getMemberOfFamily() + "\r\n";
        sText += "AddressVersion = " + doc.getAddressVersion() + "\r\n";
        sText += "Street = " + doc.getStreet() + "\r\n";
        sText += "ZipCode = " + doc.getZipCode() + "\r\n";
        sText += "Municipality = " + doc.getMunicipality() + "\r\n";
        sText += "Country = " + doc.getCountry() + "\r\n";
        sText += "SpecialStatus = " + doc.getSpecialStatus() + "\r\n";

        sText += "\r\n";
        sText += "\r\n";

        sText += @"CARD DATA" + "\r\n";
        sText += "\r\n";
        sText += "LogicalNumber = " + doc.getLogicalNumber() + "\r\n";
        sText += "ChipNumber = " + doc.getChipNumber() + "\r\n";
        sText += "ValidityBeginDate = " + doc.getValidityBeginDate() + "\r\n";
        sText += "ValidityEndDate = " + doc.getValidityEndDate() + "\r\n";
        sText += "IssuingMunicipality = " + doc.getIssuingMunicipality() + "\r\n";

        Image photo;
        PTEID_Picture picture;
        picture = card.getPicture();

        byte[] bytearray;
        bytearray = picture.getData().GetBytes();
        
        MemoryStream ms;
        ms = new MemoryStream();
        ms.Write(bytearray, 0, bytearray.Length);

        photo = Image.FromStream(ms, true);
        this.img.Image = photo;

        return sText;

    }
コード例 #2
0
ファイル: Form1.cs プロジェクト: 12019/svn.gov.pt
    private string Load_sis(PTEID_ReaderContext Reader)
    {
        string sText;
        PTEID_SISCard card;
        card = Reader.getSISCard();

        PTEID_SisId doc;
        doc = card.getID();

        sText = "";
        sText += "PERSONNAL DATA" + "\r\n";
        sText += "\r\n";
        sText += "Name = " + doc.getName() + "\r\n";
        sText += "Surname = " + doc.getSurname() + "\r\n";
        sText += "Initials = " + doc.getInitials() + "\r\n";
        sText += "Gender = " + doc.getGender() + "\r\n";
        sText += "DateOfBirth = " + doc.getDateOfBirth() + "\r\n";
        sText += "SocialSecurityNumber = " + doc.getSocialSecurityNumber() + "\r\n";

        sText += "\r\n";;
        sText += "\r\n";;

        sText += "CARD DATA" + "\r\n";
        sText += "\r\n";
        sText += "LogicalNumber = " + doc.getLogicalNumber() + "\r\n";
        sText += "DateOfIssue = " + doc.getDateOfIssue() + "\r\n";
        sText += "ValidityBeginDate = " + doc.getValidityBeginDate() + "\r\n";
        sText += "ValidityEndDate = " + doc.getValidityEndDate() + "\r\n";

        return sText;

        }
コード例 #3
0
ファイル: PTEID_ReaderSet.cs プロジェクト: 12019/svn.gov.pt
 public PTEID_ReaderContext getReaderByName(string readerName) {
   PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByName(swigCPtr, readerName), false);
   if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
コード例 #4
0
ファイル: PTEID_ReaderSet.cs プロジェクト: 12019/svn.gov.pt
 public PTEID_ReaderContext getReaderByCardSerialNumber(string cardSerialNumber) {
   PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByCardSerialNumber(swigCPtr, cardSerialNumber), false);
   if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
コード例 #5
0
ファイル: PTEID_ReaderSet.cs プロジェクト: 12019/svn.gov.pt
 public PTEID_ReaderContext getReaderByNum(uint ulIndex) {
   PTEID_ReaderContext ret = new PTEID_ReaderContext(pteidlib_dotNetPINVOKE.PTEID_ReaderSet_getReaderByNum(swigCPtr, ulIndex), false);
   if (pteidlib_dotNetPINVOKE.SWIGPendingException.Pending) throw pteidlib_dotNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
コード例 #6
0
 internal static HandleRef getCPtr(PTEID_ReaderContext obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }