mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-14 07:04:50 -04:00
WIP. Frontend 95% ready. Network backend 80% ready.
This commit is contained in:
parent
5e4a93af7c
commit
863c69affa
6 changed files with 134 additions and 34 deletions
|
@ -18,11 +18,11 @@ import nsusbloader.ServiceWindow;
|
|||
import nsusbloader.USB.UsbCommunications;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.net.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
public class NSLMainController implements Initializable {
|
||||
|
||||
|
@ -206,10 +206,10 @@ public class NSLMainController implements Initializable {
|
|||
workThread.start();
|
||||
}
|
||||
else { // NET INSTALL OVER TINFOIL
|
||||
if (SettingsTabController.isNsIpValidate() && !nsIpTextField.getText().trim().matches("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"))
|
||||
if (SettingsTabController.isNsIpValidate() && !nsIpTextField.getText().matches("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"))
|
||||
if (!ServiceWindow.getConfirmationWindow(resourceBundle.getString("windowTitleBadIp"),resourceBundle.getString("windowBodyBadIp")))
|
||||
return;
|
||||
String nsIP = nsIpTextField.getText().trim();
|
||||
String nsIP = nsIpTextField.getText();
|
||||
|
||||
List<File> nspToUpload;
|
||||
if (!SettingsTabController.getExpertModeSelected()) {
|
||||
|
|
|
@ -9,10 +9,8 @@ import javafx.scene.layout.VBox;
|
|||
import nsusbloader.AppPreferences;
|
||||
import nsusbloader.ServiceWindow;
|
||||
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
public class SettingsController implements Initializable {
|
||||
|
||||
|
@ -53,12 +51,16 @@ public class SettingsController implements Initializable {
|
|||
pcIpTextField.setDisable(AppPreferences.getInstance().getAutoDetectIp());
|
||||
autoDetectIpCb.setOnAction(e->{
|
||||
pcIpTextField.setDisable(autoDetectIpCb.isSelected());
|
||||
if (!autoDetectIpCb.isSelected())
|
||||
pcIpTextField.requestFocus();
|
||||
});
|
||||
|
||||
randPortCb.setSelected(AppPreferences.getInstance().getRandPort());
|
||||
pcPortTextField.setDisable(AppPreferences.getInstance().getRandPort());
|
||||
randPortCb.setOnAction(e->{
|
||||
pcPortTextField.setDisable(randPortCb.isSelected());
|
||||
if (!randPortCb.isSelected())
|
||||
pcPortTextField.requestFocus();
|
||||
});
|
||||
|
||||
if (AppPreferences.getInstance().getNotServeRequests()){
|
||||
|
@ -85,6 +87,7 @@ public class SettingsController implements Initializable {
|
|||
pcPortTextField.setDisable(false);
|
||||
|
||||
pcExtraTextField.setDisable(false);
|
||||
pcIpTextField.requestFocus();
|
||||
}
|
||||
else {
|
||||
autoDetectIpCb.setDisable(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue