示例#1
0
        /// <summary>
        /// Read the Citizen ID data and sets the class properties
        /// </summary>
        public void CC_Read_Info()
        {
            // Public Citizen Identity Data
            Id citizen = EIDPT.GetID();

            txtIdNumber.Text = citizen.BI;
            txtFullName.Text = citizen.FirstName + " " + citizen.Name;
        }
示例#2
0
        // Events(only for UI update)

        /// <summary>
        ///
        /// </summary>
        /// <param name="readerName"></param>
        /// <param name="cardName"></param>
        void ScWatcher_CardInserted(string readerName, string cardName)
        {
            try
            {
                EIDPT.Init(readerName);
                EIDPT.SetSODChecking(false);
            }
            catch
            {
                EIDPT.Exit(ExitMode.LEAVE_CARD);
                return;
            }

            lblStatus.Text = "Card Inserted.";
            ShowCitizenInfo();
        }
示例#3
0
        /// <summary>
        /// Only Reads the photo, set's the class properties and returns the photo
        /// </summary>
        /// <returns>Citizen photo</returns>
        public Image CC_Get_Photo()
        {
            MemoryStream ms = null;

            try
            {
                Picture picture = EIDPT.GetPicture();
                ms = new MemoryStream(picture.Bytes, 0, picture.BytesLength, false);
                // JPEG2000 Support provided by CSJ2K (http://csj2k.codeplex.com/)
                Image tempImage = CSJ2K.J2kImage.FromStream(ms);
                return(tempImage);
            }
            finally
            {
                ms.Close();
            }
        }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="readerName"></param>
 void ScWatcher_ReaderRemoved(string readerName)
 {
     EIDPT.Exit(ExitMode.LEAVE_CARD);
     lblStatus.Text = "Card Reader Removed: " + readerName;
 }
示例#5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="readerName"></param>
 void ScWatcher_CardRemoved(string readerName)
 {
     EIDPT.Exit(ExitMode.LEAVE_CARD);
     lblStatus.Text = "Card Removed.";
     HideCitizenInfo();
 }