minor fixes

This commit is contained in:
Dmitry Isaenko 2019-02-11 17:33:53 +03:00
parent d4e272d1bf
commit b8d89090a2
6 changed files with 14 additions and 5 deletions

View file

@ -1,5 +1,8 @@
package nsusbloader;
/**
* It's a workaround to execute JavaFX application.
* */
public class Main {
public static void main(String[] args){ NSLMain.main(args); }
}

View file

@ -3,6 +3,7 @@
@author Dmitry Isaenko
License: GNU GPL v.3
@see https://github.com/developersu/
@see https://developersu.blogspot.com/
2019, Russia
*/
package nsusbloader;

View file

@ -45,7 +45,7 @@ public class NSLMainController implements Initializable {
uploadStopBtn.setDisable(true);
selectNspBtn.setOnAction(e->{ selectFilesBtnAction(); });
uploadStopBtn.setOnAction(e->{ uploadToNsBtnAction(); });
uploadStopBtn.setOnAction(e->{ uploadBtnAction(); });
this.btnUpStopImage = new Region();
btnUpStopImage.getStyleClass().add("regionUpload");
@ -85,7 +85,7 @@ public class NSLMainController implements Initializable {
/**
* It's button listener when no transmission executes
* */
private void uploadToNsBtnAction(){
private void uploadBtnAction(){
if (usbThread == null || !usbThread.isAlive()){
UsbCommunications usbCommunications = new UsbCommunications(logArea, progressBar, nspToUpload); //todo: progress bar
usbThread = new Thread(usbCommunications);
@ -119,7 +119,7 @@ public class NSLMainController implements Initializable {
}
else {
selectNspBtn.setDisable(false);
uploadStopBtn.setOnAction(e->{ uploadToNsBtnAction(); });
uploadStopBtn.setOnAction(e->{ uploadBtnAction(); });
uploadStopBtn.setText(resourceBundle.getString("btnUpload"));

View file

@ -10,6 +10,7 @@ public class ServiceWindow {
/**
* Create window with notification
* */
/* // not used
static void getErrorNotification(String title, String body){
Alert alertBox = new Alert(Alert.AlertType.ERROR);
alertBox.setTitle(title);
@ -22,6 +23,10 @@ public class ServiceWindow {
alertBox.getDialogPane().getStylesheets().add("/res/app.css");
alertBox.show();
}
*/
/**
* Create notification window with confirm/deny
* */
static boolean getConfirmationWindow(String title, String body){
Alert alertBox = new Alert(Alert.AlertType.CONFIRMATION);
alertBox.setTitle(title);