diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index f9ca486..f979071 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index 20dcf57..3924045 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -746,7 +746,7 @@
-
+
提示
@@ -796,7 +796,7 @@
通过
-
+
无图
@@ -822,45 +822,50 @@
设备
-
+
用户
-
+
新建项目
-
+
账户管理
-
+
修改密码
-
+
导出
-
+
登出
-
+
关闭
-
+
上传配置文件
+
+
+
+ 刷新设备列表
+
@@ -891,6 +896,7 @@
+
提示
@@ -919,6 +925,7 @@
+
不能创建更多项目
diff --git a/app/HGProductionTool/form_burnmode.cpp b/app/HGProductionTool/form_burnmode.cpp
index b27170c..7967ddd 100644
--- a/app/HGProductionTool/form_burnmode.cpp
+++ b/app/HGProductionTool/form_burnmode.cpp
@@ -341,8 +341,8 @@ void Form_BurnMode::on_pbtn_close_clicked()
return;
}
- int i = 0;
- while(ui->tableWidget->rowCount() > i)
+ int rowCount = ui->tableWidget->rowCount();
+ for (int i = rowCount - 1; i >= 0; --i)
{
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
if (item != nullptr && Qt::Checked == item->checkState())
diff --git a/app/HGProductionTool/mainwindow.cpp b/app/HGProductionTool/mainwindow.cpp
index fce1e9a..05c41a7 100644
--- a/app/HGProductionTool/mainwindow.cpp
+++ b/app/HGProductionTool/mainwindow.cpp
@@ -596,3 +596,35 @@ void MainWindow::on_act_upload_triggered()
Dialog_uploadCfgFile dlg(m_pdtToolDbuserMgr, this);
dlg.exec();
}
+
+void MainWindow::on_act_refreshDevice_triggered()
+{
+ std::vector name;
+ name = getDevices();
+ for (int i = 0; i < name.size(); ++i)
+ {
+ SANE_Handle devHandle = nullptr;
+ sane_open(name[i].c_str(), &devHandle);
+ if (nullptr != devHandle)
+ {
+ Dialog_InputSerialNum dlg(this, devHandle, getDevSn(devHandle), getDevType(devHandle));
+ if (dlg.exec())
+ {
+ HGPdtToolDbDevice pdtToolDbDevice = nullptr;
+ HGPdtToolDb_OpenDevice(m_pdtToolDbuserMgr, dlg.GetSn().toStdString().c_str(), &pdtToolDbDevice);
+
+ Form_mainInterface *mainInterface = new Form_mainInterface(this, m_loginType, devHandle, m_pdtToolDbuserMgr, pdtToolDbDevice,
+ dlg.GetSn(), dlg.GetDevType(), name[i].c_str(), getDevFwNum(devHandle));
+ if (!AddInterface(mainInterface))
+ {
+ QMessageBox::information(this, tr("tips"), tr("cannot create more table"));
+ delete mainInterface;
+ }
+ }
+ else
+ {
+ sane_close(devHandle);
+ }
+ }
+ }
+}
diff --git a/app/HGProductionTool/mainwindow.h b/app/HGProductionTool/mainwindow.h
index c20349f..0da4b33 100644
--- a/app/HGProductionTool/mainwindow.h
+++ b/app/HGProductionTool/mainwindow.h
@@ -70,6 +70,8 @@ private slots:
void on_act_upload_triggered();
+ void on_act_refreshDevice_triggered();
+
private:
QSplitter *m_top_splitter;
QSplitter *m_bot_splitter;
diff --git a/app/HGProductionTool/mainwindow.ui b/app/HGProductionTool/mainwindow.ui
index fb37090..2488f48 100644
--- a/app/HGProductionTool/mainwindow.ui
+++ b/app/HGProductionTool/mainwindow.ui
@@ -28,6 +28,9 @@
menu_device
+
+
+