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(""); }
public static String writeUID(string uid) { return(NFCTool.exec("nfc-mfsetuid.exe", " -f " + uid).Trim()); }
public static String getDeviceName() { return(NFCTool.exec("nfc-list.exe").Trim().Split('\n')[1].Replace("opened", "").Trim()); }
public static bool checkDevice() { return(!NFCTool.exec("nfc-list.exe").Trim().Contains("No NFC device found.")); }