Example #1
0
        public static String readUID()
        {
            String output = NFCTool.exec("nfc-list.exe").Trim();
            Regex  regx   = new Regex("UID \\(\\S*\\): ((\\S\\S\\s\\s){4})", RegexOptions.IgnoreCase);

            if (regx.IsMatch(output))
            {
                return(regx.Match(output).Value.ToUpper().Replace(" ", "").Split(':')[1]);
            }
            return("");
        }
Example #2
0
 public static String writeUID(string uid)
 {
     return(NFCTool.exec("nfc-mfsetuid.exe", " -f " + uid).Trim());
 }
Example #3
0
 public static String getDeviceName()
 {
     return(NFCTool.exec("nfc-list.exe").Trim().Split('\n')[1].Replace("opened", "").Trim());
 }
Example #4
0
 public static bool checkDevice()
 {
     return(!NFCTool.exec("nfc-list.exe").Trim().Contains("No NFC device found."));
 }