private void ReadUserInfo(object Oip_mN) { string ip_mN = (string)Oip_mN; string[] ip_mNArray = ip_mN.Split('@'); //取得Reader同卡間隔內不重複的Tag資料 Byte[] _SensorData = new Byte[] { 0xF8, 0xFA, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x54 }; while (toRead) { CommunicationBase cb = new CommunicationBase(); string reciveText = cb.Connection(_SensorData, ip_mNArray[0]); if (reciveText.Length > 3) { WriteLog("◆卡號:" + cb.GetCardNumber(reciveText) + " ◆時間:" + cb.GetTime(reciveText) + " ◆機碼:" + ip_mNArray[1]); } } }
private void ReadUserInfo(object Oip_mN) { string ip_mN = (string)Oip_mN; string[] ip_mNArray = ip_mN.Split('@'); //取得Reader同卡間隔內不重複的Tag資料 Byte[] _SensorData = new Byte[] { 0xF8, 0xFA, 0x00, 0x00, 0x00, 0x02, 0xCB, 0x54 }; while (isRead) { string openDoor = ""; string reciveText = cb.Connection(_SensorData, ip_mNArray[0]); string cardN = cb.GetCardNumber(reciveText); if (!cardN.Equals("")) { while (isEnterValid) { Thread.Sleep(500); // Do nothing. } isEnterValid = true; string sueecssString = Valid(cardN, ip_mNArray[0]); DataTable dtMen = new DataTable(); string[] conditinInfo = new string[] { "Card_number=" + cardN }; dtMen = sql.Query_Condition("Menbers_Table", conditinInfo, 0); if (!sueecssString.Equals("")) { if (reciveText.Length > 3) { WriteLog("◆卡號:" + cardN + " ◆時間:" + cb.GetTime(reciveText) + " ◆車牌:" + dtMen.Rows[0][2].ToString() + " ◆車主:" + dtMen.Rows[0][3].ToString() + " ◆機碼:" + ip_mNArray[1] + " ◆門禁狀態:" + sueecssString); } } isEnterValid = false; } } }