private boolean integratorBool = false;
private JTextArea textArea;
private JScrollPane scrollPane;
+ private CompletableFuture<Void> softwareUpdateFuture = null;
/**
* Launch the application.
+ "\nSaveScoreLog: " + property.isSaveScoreLog()
+ "\nOutputDebugSentences: " + property.isOutputDebugSentences());
if(property.isCheckVersion()) {
- CompletableFuture<Void> softwareUpdateFuture = CompletableFuture.runAsync(() -> CheckVersion.needToBeUpdated(), es);
+ softwareUpdateFuture = CompletableFuture.runAsync(() -> CheckVersion.needToBeUpdated(), es);
}
BiConsumer<ArrayList<Song>, ArrayList<Song>> updateConsumer = (list1, list2) -> {
LimitedLog.println(this.getClass() + ":[INFO]: " + "Checking database updates...");
btnExit = new JButton("終了");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- LimitedLog.println(this.getClass() + ":[INFO]: " +"Requested Exit by Button");
- System.exit(0);
+ if(softwareUpdateFuture.isDone()) {
+ LimitedLog.println(this.getClass() + ":[INFO]: " +"Requested Exit by Button");
+ System.exit(0);
+ } else {
+ JOptionPane.showMessageDialog(null, "内部更新処理が完了していません。少し待ってからやり直してください。");
+ }
}
});
btnExit.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));