diff --git a/common/util.h b/common/util.h
index 34c47fb..a790c94 100644
--- a/common/util.h
+++ b/common/util.h
@@ -31,10 +31,10 @@ private:
bool isRequiringOutput;
QString* requiredOutput;
QTime timeStamp;
+ ClientType clientType;
signals:
void refreshOutput(const QString& output);
void write(QString data);
- ClientType clientType;
};
#endif // UTIL_H
diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp
index a6ba92f..b93ff86 100644
--- a/ui/mainwindow.cpp
+++ b/ui/mainwindow.cpp
@@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent):
pm3Thread->start();
pm3state = false;
- util = new Util(this);
+ util = new Util(Util::OFFICIAL, this);
mifare = new Mifare(ui, util, this);
}
@@ -178,7 +178,15 @@ void MainWindow::MF_onTypeChanged(int id, bool st)
qDebug() << id << typeBtnGroup->checkedId();
if(!st)
{
- int result = QMessageBox::question(this, tr("Info"), tr("When Changeing card type, the data and keys in this app will be cleard.") + "\n" + tr("Continue?"), QMessageBox::Yes | QMessageBox::No);
+ int result;
+ if(id > typeBtnGroup->checkedId()) // id is specified in uiInit() with a proper order, so I can compare the size by id.
+ {
+ result = QMessageBox::question(this, tr("Info"), tr("When Changeing card type, the data and keys in this app will be cleard.") + "\n" + tr("Continue?"), QMessageBox::Yes | QMessageBox::No);
+ }
+ else
+ {
+ result = QMessageBox::Yes;
+ }
if(result == QMessageBox::Yes)
{
qDebug() << "Yes";
@@ -754,6 +762,8 @@ void MainWindow::uiInit()
}
settings->endGroup();
+
+
on_Raw_CMDHistoryBox_stateChanged(Qt::Unchecked);
on_PM3_refreshPortButton_clicked();
}
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index 5a6d38e..5603ed5 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -281,14 +281,14 @@
-
- MINI
+ MINI
-
- 1K
+ 1K
true
@@ -298,14 +298,14 @@
-
- 2K
+ 2K
-
- 4K
+ 4K