Add MF_ReadBlock/WriteBlock function

pull/2/head
wh201906 5 years ago
parent c25e2f9e4a
commit fc91bfee2c

@ -205,6 +205,36 @@ void MainWindow::on_MF_RW_readAllButton_clicked()
} }
void MainWindow::on_MF_RW_readBlockButton_clicked()
{
QString result = execCMDWithOutput("hf mf rdbl "
+ ui->MF_RW_blockBox->text()
+ " "
+ ui->MF_RW_keyTypeBox->currentText()
+ " "
+ ui->MF_RW_keyEdit->text());
if(result.indexOf("isOk:01") != -1)
{
ui->MF_RW_dataEdit->setText(result.mid(result.indexOf("isOk:01")+13, 47).toUpper());
}
}
void MainWindow::on_MF_RW_writeBlockButton_clicked()
{
QString result = execCMDWithOutput("hf mf wrbl "
+ ui->MF_RW_blockBox->text()
+ " "
+ ui->MF_RW_keyTypeBox->currentText()
+ " "
+ ui->MF_RW_keyEdit->text()
+ " "
+ ui->MF_RW_dataEdit->text().replace(" ",""));
if(result.indexOf("isOk:01") != -1)
{
}
}
// ************************************************ // ************************************************

@ -59,6 +59,10 @@ private slots:
void on_MF_RW_readAllButton_clicked(); void on_MF_RW_readAllButton_clicked();
void on_MF_RW_readBlockButton_clicked();
void on_MF_RW_writeBlockButton_clicked();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
PM3Process* pm3; PM3Process* pm3;

@ -415,12 +415,16 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="MF_RW_keyEdit"/> <widget class="QLineEdit" name="MF_RW_keyEdit">
<property name="text">
<string>FFFFFFFFFFFF</string>
</property>
</widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Type:</string> <string>Key Type:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -428,12 +432,12 @@
<widget class="QComboBox" name="MF_RW_keyTypeBox"> <widget class="QComboBox" name="MF_RW_keyTypeBox">
<item> <item>
<property name="text"> <property name="text">
<string>KeyA</string> <string>A</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>KeyB</string> <string>B</string>
</property> </property>
</item> </item>
</widget> </widget>

Loading…
Cancel
Save