fix: 显示召唤数据信息

This commit is contained in:
rainerosion 2023-03-30 10:59:55 +08:00
parent a380f75718
commit 73197d7227

View File

@ -153,10 +153,7 @@ public class Swing extends JFrame {
public void actionPerformed(ActionEvent arg0) { public void actionPerformed(ActionEvent arg0) {
btnStart.setEnabled(false); btnStart.setEnabled(false);
new Thread(new Runnable() { new Thread(() -> {
@Override
public void run() {
String paramFilePath = System.getProperty( "user.dir" ).concat("/libs/param.dat"); String paramFilePath = System.getProperty( "user.dir" ).concat("/libs/param.dat");
rsServer = RSServer.Initiate(Integer.parseInt(txtPort.getText()), paramFilePath);// 初始化 rsServer = RSServer.Initiate(Integer.parseInt(txtPort.getText()), paramFilePath);// 初始化
@ -167,7 +164,6 @@ public class Swing extends JFrame {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} // 启动监听服务 } // 启动监听服务
}
}).start(); }).start();
} }
@ -211,7 +207,8 @@ public class Swing extends JFrame {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
int deviceId = Integer.parseInt(txtDeviceId.getText()); int deviceId = Integer.parseInt(txtDeviceId.getText());
rsServer.callStoreData(deviceId); boolean b = rsServer.callStoreData(deviceId);
System.out.println("log -> " + b);
} }
}); });