minor fixes
This commit is contained in:
parent
d4e272d1bf
commit
b8d89090a2
6 changed files with 14 additions and 5 deletions
|
@ -1,5 +1,8 @@
|
||||||
package nsusbloader;
|
package nsusbloader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It's a workaround to execute JavaFX application.
|
||||||
|
* */
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args){ NSLMain.main(args); }
|
public static void main(String[] args){ NSLMain.main(args); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
@author Dmitry Isaenko
|
@author Dmitry Isaenko
|
||||||
License: GNU GPL v.3
|
License: GNU GPL v.3
|
||||||
@see https://github.com/developersu/
|
@see https://github.com/developersu/
|
||||||
|
@see https://developersu.blogspot.com/
|
||||||
2019, Russia
|
2019, Russia
|
||||||
*/
|
*/
|
||||||
package nsusbloader;
|
package nsusbloader;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class NSLMainController implements Initializable {
|
||||||
|
|
||||||
uploadStopBtn.setDisable(true);
|
uploadStopBtn.setDisable(true);
|
||||||
selectNspBtn.setOnAction(e->{ selectFilesBtnAction(); });
|
selectNspBtn.setOnAction(e->{ selectFilesBtnAction(); });
|
||||||
uploadStopBtn.setOnAction(e->{ uploadToNsBtnAction(); });
|
uploadStopBtn.setOnAction(e->{ uploadBtnAction(); });
|
||||||
|
|
||||||
this.btnUpStopImage = new Region();
|
this.btnUpStopImage = new Region();
|
||||||
btnUpStopImage.getStyleClass().add("regionUpload");
|
btnUpStopImage.getStyleClass().add("regionUpload");
|
||||||
|
@ -85,7 +85,7 @@ public class NSLMainController implements Initializable {
|
||||||
/**
|
/**
|
||||||
* It's button listener when no transmission executes
|
* It's button listener when no transmission executes
|
||||||
* */
|
* */
|
||||||
private void uploadToNsBtnAction(){
|
private void uploadBtnAction(){
|
||||||
if (usbThread == null || !usbThread.isAlive()){
|
if (usbThread == null || !usbThread.isAlive()){
|
||||||
UsbCommunications usbCommunications = new UsbCommunications(logArea, progressBar, nspToUpload); //todo: progress bar
|
UsbCommunications usbCommunications = new UsbCommunications(logArea, progressBar, nspToUpload); //todo: progress bar
|
||||||
usbThread = new Thread(usbCommunications);
|
usbThread = new Thread(usbCommunications);
|
||||||
|
@ -119,7 +119,7 @@ public class NSLMainController implements Initializable {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
selectNspBtn.setDisable(false);
|
selectNspBtn.setDisable(false);
|
||||||
uploadStopBtn.setOnAction(e->{ uploadToNsBtnAction(); });
|
uploadStopBtn.setOnAction(e->{ uploadBtnAction(); });
|
||||||
|
|
||||||
uploadStopBtn.setText(resourceBundle.getString("btnUpload"));
|
uploadStopBtn.setText(resourceBundle.getString("btnUpload"));
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ public class ServiceWindow {
|
||||||
/**
|
/**
|
||||||
* Create window with notification
|
* Create window with notification
|
||||||
* */
|
* */
|
||||||
|
/* // not used
|
||||||
static void getErrorNotification(String title, String body){
|
static void getErrorNotification(String title, String body){
|
||||||
Alert alertBox = new Alert(Alert.AlertType.ERROR);
|
Alert alertBox = new Alert(Alert.AlertType.ERROR);
|
||||||
alertBox.setTitle(title);
|
alertBox.setTitle(title);
|
||||||
|
@ -22,6 +23,10 @@ public class ServiceWindow {
|
||||||
alertBox.getDialogPane().getStylesheets().add("/res/app.css");
|
alertBox.getDialogPane().getStylesheets().add("/res/app.css");
|
||||||
alertBox.show();
|
alertBox.show();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Create notification window with confirm/deny
|
||||||
|
* */
|
||||||
static boolean getConfirmationWindow(String title, String body){
|
static boolean getConfirmationWindow(String title, String body){
|
||||||
Alert alertBox = new Alert(Alert.AlertType.CONFIRMATION);
|
Alert alertBox = new Alert(Alert.AlertType.CONFIRMATION);
|
||||||
alertBox.setTitle(title);
|
alertBox.setTitle(title);
|
||||||
|
|
|
@ -10,5 +10,5 @@ windowTitleConfirmExit=No, don't do this!
|
||||||
btnStop=Interrupt
|
btnStop=Interrupt
|
||||||
logsGreetingsMessage2=--\n\
|
logsGreetingsMessage2=--\n\
|
||||||
Source: https://github.com/developersu/ns-usbloader/\n\
|
Source: https://github.com/developersu/ns-usbloader/\n\
|
||||||
Site: https://developersu.blogspot.com/search/label/nsusbloader\n\
|
Site: https://developersu.blogspot.com/search/label/NS-USBloader\n\
|
||||||
Dmitry Isaenko [developer.su]
|
Dmitry Isaenko [developer.su]
|
||||||
|
|
|
@ -10,6 +10,6 @@ windowTitleConfirmExit=\u041D\u0435\u0442, \u043E\u0441\u0442\u0430\u043D\u043E\
|
||||||
btnStop=\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C
|
btnStop=\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C
|
||||||
logsGreetingsMessage2=--\n\
|
logsGreetingsMessage2=--\n\
|
||||||
\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434: https://github.com/developersu/ns-usbloader/\n\
|
\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434: https://github.com/developersu/ns-usbloader/\n\
|
||||||
\u0421\u0430\u0439\u0442: https://developersu.blogspot.com/search/label/nsusbloader\n\
|
\u0421\u0430\u0439\u0442: https://developersu.blogspot.com/search/label/NS-USBloader\n\
|
||||||
\u0418\u0441\u0430\u0435\u043D\u043A\u043E \u0414\u043C\u0438\u0442\u0440\u0438\u0439 [developer.su]
|
\u0418\u0441\u0430\u0435\u043D\u043A\u043E \u0414\u043C\u0438\u0442\u0440\u0438\u0439 [developer.su]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue