| | |
| | | } |
| | | if (this.getIntent().hasExtra("domainCard_luyi")) { |
| | | domainCard = (DomainCard) this.getIntent().getSerializableExtra("domainCard_luyi"); |
| | | binding.cardData.setText("制作设置新乡域名卡"); |
| | | binding.cardData.setText("制作设置鹿邑域名卡"); |
| | | } |
| | | if (this.getIntent().hasExtra("testCard")) { |
| | | testCard = (TestCard) this.getIntent().getSerializableExtra("testCard"); |
| | |
| | | } |
| | | |
| | | private void setmanageCard(Intent intent, final ManageCard manageCard) { |
| | | manageCardFlag = NFCWriteHelper.getInstence(intent, this).writeData(manageCard.toZeroByte(baseDao), 1, 0); |
| | | try { |
| | | manageCardFlag = NFCWriteHelper.getInstence(intent, this).writeData(manageCard.toZeroByte(baseDao), 1, 0); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param clearOrInitCard |
| | | */ |
| | | private void setClean(Intent intent, final CleanCard clearOrInitCard) { |
| | | cleanFlag = NFCWriteHelper.getInstence(intent, this).writeData(clearOrInitCard.toByte(baseDao), 1, 0); |
| | | try { |
| | | cleanFlag = NFCWriteHelper.getInstence(intent, this).writeData(clearOrInitCard.toByte(baseDao), 1, 0); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @param registeredCard |
| | | */ |
| | | private void setRegisteredCard(Intent intent, RegisteredCard registeredCard) { |
| | | registeredFlag = NFCWriteHelper.getInstence(intent, this).writeData(registeredCard.toByte(baseDao), 1, 0); |
| | | try { |
| | | registeredFlag = NFCWriteHelper.getInstence(intent, this).writeData(registeredCard.toByte(baseDao), 1, 0); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param cleanUserCard |
| | | */ |
| | | private void setCleanUserCard(Intent intent, CleanUserCard cleanUserCard) { |
| | | cleanUserCardFlag = NFCWriteHelper.getInstence(intent, this).writeData(cleanUserCard.toByte(baseDao), 1, 0); |
| | | try { |
| | | cleanUserCardFlag = NFCWriteHelper.getInstence(intent, this).writeData(cleanUserCard.toByte(baseDao), 1, 0); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainXinXiangCard.getTwoByte(), 1, 2); |
| | | } catch (Exception e) { |
| | | domainCrdFlag = false; |
| | | throw new RuntimeException(e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | |
| | | configPowerFlag = NFCWriteHelper.getInstence(intent, this).writeData(configurationPowerCard.toByte(baseDao), 1, 0); |
| | | } catch (Exception e) { |
| | | configPowerFlag = false; |
| | | throw new RuntimeException(e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |