mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 06:34:43 -04:00
Styles fixing; code cleanup
This commit is contained in:
parent
bb87b72b91
commit
4177c4672d
4 changed files with 38 additions and 40 deletions
|
@ -27,47 +27,36 @@ public class NSLMain extends Application {
|
|||
else
|
||||
rb = ResourceBundle.getBundle("locale", new Locale("en"));
|
||||
|
||||
// If it's windows, refuse to work
|
||||
/*
|
||||
if (System.getProperty("os.name").toLowerCase().startsWith("win")){
|
||||
ServiceWindow.getErrorNotification(rb.getString("windowErrorHeader"), rb.getString("windowItsWindowsMessage"));
|
||||
}
|
||||
else{
|
||||
/*/
|
||||
// If it's not, go ahead
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/NSLMain.fxml"));
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/NSLMain.fxml"));
|
||||
|
||||
loader.setResources(rb);
|
||||
Parent root = loader.load();
|
||||
loader.setResources(rb);
|
||||
Parent root = loader.load();
|
||||
|
||||
primaryStage.getIcons().addAll(
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon32x32.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon48x48.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon64x64.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon128x128.png"))
|
||||
);
|
||||
primaryStage.getIcons().addAll(
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon32x32.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon48x48.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon64x64.png")),
|
||||
new Image(getClass().getResourceAsStream("/res/app_icon128x128.png"))
|
||||
);
|
||||
|
||||
primaryStage.setTitle("NS-USBloader");
|
||||
primaryStage.setMinWidth(600);
|
||||
primaryStage.setMinHeight(375);
|
||||
Scene mainScene = new Scene(root, 800, 400);
|
||||
mainScene.getStylesheets().add("/res/app.css");
|
||||
primaryStage.setScene(mainScene);
|
||||
primaryStage.show();
|
||||
primaryStage.setTitle("NS-USBloader");
|
||||
primaryStage.setMinWidth(600);
|
||||
primaryStage.setMinHeight(375);
|
||||
Scene mainScene = new Scene(root, 800, 400);
|
||||
mainScene.getStylesheets().add("/res/app.css");
|
||||
primaryStage.setScene(mainScene);
|
||||
primaryStage.show();
|
||||
|
||||
primaryStage.setOnCloseRequest(e->{
|
||||
if (MediatorControl.getInstance().getTransferActive())
|
||||
if(! ServiceWindow.getConfirmationWindow(rb.getString("windowTitleConfirmExit"), rb.getString("windowBodyConfirmExit")))
|
||||
e.consume();
|
||||
});
|
||||
}
|
||||
/*/
|
||||
primaryStage.setOnCloseRequest(e->{
|
||||
if (MediatorControl.getInstance().getTransferActive())
|
||||
if(! ServiceWindow.getConfirmationWindow(rb.getString("windowTitleConfirmExit"), rb.getString("windowBodyConfirmExit")))
|
||||
e.consume();
|
||||
});
|
||||
}
|
||||
/*/
|
||||
|
||||
public static void main(String[] args) {
|
||||
if ((args.length == 1) && (args[0].equals("-v") || args[0].equals("--version"))){
|
||||
System.out.println(NSLMain.appVersion);
|
||||
System.out.println("NS-USBloader "+NSLMain.appVersion);
|
||||
}
|
||||
else
|
||||
launch(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue