Compare commits
No commits in common. "6e21c514a8503d5c970e5303698b37576ffc1214" and "98822de55958a7de36044d96c9bc766d4db9f88d" have entirely different histories.
6e21c514a8
...
98822de559
10 changed files with 37 additions and 64 deletions
|
@ -44,7 +44,7 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
public class GamesController implements Initializable {
|
public class FrontController implements Initializable {
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane usbNetPane;
|
private AnchorPane usbNetPane;
|
||||||
|
|
||||||
|
@ -353,7 +353,6 @@ public class GamesController implements Initializable {
|
||||||
usbNetPane.setDisable(isActive);
|
usbNetPane.setDisable(isActive);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectNspBtn.setDisable(isActive);
|
selectNspBtn.setDisable(isActive);
|
||||||
selectSplitNspBtn.setDisable(isActive);
|
selectSplitNspBtn.setDisable(isActive);
|
||||||
btnUpStopImage.getStyleClass().clear();
|
btnUpStopImage.getStyleClass().clear();
|
||||||
|
@ -363,18 +362,17 @@ public class GamesController implements Initializable {
|
||||||
|
|
||||||
uploadStopBtn.setOnAction(e-> stopBtnAction());
|
uploadStopBtn.setOnAction(e-> stopBtnAction());
|
||||||
uploadStopBtn.setText(resourceBundle.getString("btn_Stop"));
|
uploadStopBtn.setText(resourceBundle.getString("btn_Stop"));
|
||||||
uploadStopBtn.getStyleClass().remove("buttonUp");
|
uploadStopBtn.getStyleClass().clear();
|
||||||
uploadStopBtn.getStyleClass().add("buttonStop");
|
uploadStopBtn.getStyleClass().add("buttonStop");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
btnUpStopImage.getStyleClass().add("regionUpload");
|
btnUpStopImage.getStyleClass().add("regionUpload");
|
||||||
|
|
||||||
uploadStopBtn.setOnAction(e-> uploadBtnAction());
|
uploadStopBtn.setOnAction(e-> uploadBtnAction());
|
||||||
uploadStopBtn.setText(resourceBundle.getString("btn_Upload"));
|
uploadStopBtn.setText(resourceBundle.getString("btn_Upload"));
|
||||||
uploadStopBtn.getStyleClass().remove("buttonStop");
|
uploadStopBtn.getStyleClass().clear();
|
||||||
uploadStopBtn.getStyleClass().add("buttonUp");
|
uploadStopBtn.getStyleClass().add("buttonUp");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Crunch. This function called from NSTableViewController
|
* Crunch. This function called from NSTableViewController
|
||||||
* */
|
* */
|
|
@ -41,7 +41,7 @@ public class NSLMainController implements Initializable {
|
||||||
public ProgressBar progressBar; // Accessible from Mediator
|
public ProgressBar progressBar; // Accessible from Mediator
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public GamesController GamesTabController; // Accessible from Mediator | todo: incapsulate
|
public FrontController FrontTabController; // Accessible from Mediator | todo: incapsulate
|
||||||
@FXML
|
@FXML
|
||||||
private SettingsController SettingsTabController;
|
private SettingsController SettingsTabController;
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -103,8 +103,8 @@ public class NSLMainController implements Initializable {
|
||||||
return SettingsTabController;
|
return SettingsTabController;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GamesController getGamesCtrlr(){
|
public FrontController getFrontCtrlr(){
|
||||||
return GamesTabController;
|
return FrontTabController;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SplitMergeController getSmCtrlr(){
|
public SplitMergeController getSmCtrlr(){
|
||||||
|
@ -118,7 +118,7 @@ public class NSLMainController implements Initializable {
|
||||||
* Save preferences before exit
|
* Save preferences before exit
|
||||||
* */
|
* */
|
||||||
public void exit(){
|
public void exit(){
|
||||||
GamesTabController.updatePreferencesOnExit();
|
FrontTabController.updatePreferencesOnExit();
|
||||||
SettingsTabController.updatePreferencesOnExit();
|
SettingsTabController.updatePreferencesOnExit();
|
||||||
SplitMergeTabController.updatePreferencesOnExit(); // NOTE: This shit above should be re-written to similar pattern
|
SplitMergeTabController.updatePreferencesOnExit(); // NOTE: This shit above should be re-written to similar pattern
|
||||||
RcmTabController.updatePreferencesOnExit();
|
RcmTabController.updatePreferencesOnExit();
|
||||||
|
|
|
@ -24,10 +24,12 @@ import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.SnapshotParameters;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.cell.CheckBoxTableCell;
|
import javafx.scene.control.cell.CheckBoxTableCell;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import javafx.scene.input.*;
|
import javafx.scene.input.*;
|
||||||
|
import javafx.scene.paint.Paint;
|
||||||
import nsusbloader.MediatorControl;
|
import nsusbloader.MediatorControl;
|
||||||
import nsusbloader.NSLDataTypes.EFileStatus;
|
import nsusbloader.NSLDataTypes.EFileStatus;
|
||||||
|
|
||||||
|
@ -57,7 +59,7 @@ public class NSTableViewController implements Initializable {
|
||||||
if (keyEvent.getCode() == KeyCode.DELETE && !MediatorControl.getInstance().getTransferActive()) {
|
if (keyEvent.getCode() == KeyCode.DELETE && !MediatorControl.getInstance().getTransferActive()) {
|
||||||
rowsObsLst.removeAll(table.getSelectionModel().getSelectedItems());
|
rowsObsLst.removeAll(table.getSelectionModel().getSelectedItems());
|
||||||
if (rowsObsLst.isEmpty())
|
if (rowsObsLst.isEmpty())
|
||||||
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
MediatorControl.getInstance().getContoller().getFrontCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
||||||
table.refresh();
|
table.refresh();
|
||||||
} else if (keyEvent.getCode() == KeyCode.SPACE) {
|
} else if (keyEvent.getCode() == KeyCode.SPACE) {
|
||||||
for (NSLRowModel item : table.getSelectionModel().getSelectedItems()) {
|
for (NSLRowModel item : table.getSelectionModel().getSelectedItems()) {
|
||||||
|
@ -175,13 +177,13 @@ public class NSTableViewController implements Initializable {
|
||||||
deleteMenuItem.setOnAction(actionEvent -> {
|
deleteMenuItem.setOnAction(actionEvent -> {
|
||||||
rowsObsLst.remove(row.getItem());
|
rowsObsLst.remove(row.getItem());
|
||||||
if (rowsObsLst.isEmpty())
|
if (rowsObsLst.isEmpty())
|
||||||
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
MediatorControl.getInstance().getContoller().getFrontCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
||||||
table.refresh();
|
table.refresh();
|
||||||
});
|
});
|
||||||
MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_DeleteAll"));
|
MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_DeleteAll"));
|
||||||
deleteAllMenuItem.setOnAction(actionEvent -> {
|
deleteAllMenuItem.setOnAction(actionEvent -> {
|
||||||
rowsObsLst.clear();
|
rowsObsLst.clear();
|
||||||
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
MediatorControl.getInstance().getContoller().getFrontCtrlr().disableUploadStopBtn(true); // TODO: change to something better
|
||||||
table.refresh();
|
table.refresh();
|
||||||
});
|
});
|
||||||
contextMenu.getItems().addAll(deleteMenuItem, deleteAllMenuItem);
|
contextMenu.getItems().addAll(deleteMenuItem, deleteAllMenuItem);
|
||||||
|
@ -226,7 +228,7 @@ public class NSTableViewController implements Initializable {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rowsObsLst.add(new NSLRowModel(file, true));
|
rowsObsLst.add(new NSLRowModel(file, true));
|
||||||
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(false); // TODO: change to something better
|
MediatorControl.getInstance().getContoller().getFrontCtrlr().disableUploadStopBtn(false); // TODO: change to something better
|
||||||
}
|
}
|
||||||
table.refresh();
|
table.refresh();
|
||||||
}
|
}
|
||||||
|
@ -246,7 +248,7 @@ public class NSTableViewController implements Initializable {
|
||||||
else {
|
else {
|
||||||
for (File file: newFiles)
|
for (File file: newFiles)
|
||||||
rowsObsLst.add(new NSLRowModel(file, true));
|
rowsObsLst.add(new NSLRowModel(file, true));
|
||||||
MediatorControl.getInstance().getContoller().getGamesCtrlr().disableUploadStopBtn(false); // TODO: change to something better
|
MediatorControl.getInstance().getContoller().getFrontCtrlr().disableUploadStopBtn(false); // TODO: change to something better
|
||||||
}
|
}
|
||||||
//rowsObsLst.get(0).setMarkForUpload(true);
|
//rowsObsLst.get(0).setMarkForUpload(true);
|
||||||
table.refresh();
|
table.refresh();
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class MediatorControl {
|
||||||
|
|
||||||
public synchronized void setBgThreadActive(boolean isActive, EModule appModuleType) {
|
public synchronized void setBgThreadActive(boolean isActive, EModule appModuleType) {
|
||||||
isTransferActive.set(isActive);
|
isTransferActive.set(isActive);
|
||||||
mainCtrler.getGamesCtrlr().notifyThreadStarted(isActive, appModuleType);
|
mainCtrler.getFrontCtrlr().notifyThreadStarted(isActive, appModuleType);
|
||||||
mainCtrler.getSmCtrlr().notifySmThreadStarted(isActive, appModuleType);
|
mainCtrler.getSmCtrlr().notifySmThreadStarted(isActive, appModuleType);
|
||||||
mainCtrler.getRcmCtrlr().notifyThreadStarted(isActive, appModuleType);
|
mainCtrler.getRcmCtrlr().notifyThreadStarted(isActive, appModuleType);
|
||||||
mainCtrler.getNXDTabController().notifyThreadStarted(isActive, appModuleType);
|
mainCtrler.getNXDTabController().notifyThreadStarted(isActive, appModuleType);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import nsusbloader.Controllers.NSTableViewController;
|
||||||
import nsusbloader.MediatorControl;
|
import nsusbloader.MediatorControl;
|
||||||
import nsusbloader.NSLDataTypes.EFileStatus;
|
import nsusbloader.NSLDataTypes.EFileStatus;
|
||||||
import nsusbloader.NSLDataTypes.EModule;
|
import nsusbloader.NSLDataTypes.EModule;
|
||||||
|
import nsusbloader.NSLDataTypes.EMsgType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -61,7 +62,7 @@ public class MessagesConsumer extends AnimationTimer {
|
||||||
this.progressBar = MediatorControl.getInstance().getContoller().progressBar;
|
this.progressBar = MediatorControl.getInstance().getContoller().progressBar;
|
||||||
|
|
||||||
this.statusMap = statusMap;
|
this.statusMap = statusMap;
|
||||||
this.tableViewController = MediatorControl.getInstance().getContoller().GamesTabController.tableFilesListController;
|
this.tableViewController = MediatorControl.getInstance().getContoller().FrontTabController.tableFilesListController;
|
||||||
|
|
||||||
this.oneLinerStatus = oneLinerStatus;
|
this.oneLinerStatus = oneLinerStatus;
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
class NxdtUsbAbi1 {
|
class NxdtUsbAbi1 {
|
||||||
private final ILogPrinter logPrinter;
|
private final ILogPrinter logPrinter;
|
||||||
|
@ -85,7 +86,7 @@ class NxdtUsbAbi1 {
|
||||||
|
|
||||||
private static final int NXDT_USB_TIMEOUT = 5000;
|
private static final int NXDT_USB_TIMEOUT = 5000;
|
||||||
|
|
||||||
private NxdtNspFile nspFile;
|
private HashMap<String, NxdtNspFile> nspFiles;
|
||||||
|
|
||||||
public NxdtUsbAbi1(DeviceHandle handler,
|
public NxdtUsbAbi1(DeviceHandle handler,
|
||||||
ILogPrinter logPrinter,
|
ILogPrinter logPrinter,
|
||||||
|
@ -95,6 +96,7 @@ class NxdtUsbAbi1 {
|
||||||
this.handlerNS = handler;
|
this.handlerNS = handler;
|
||||||
this.logPrinter = logPrinter;
|
this.logPrinter = logPrinter;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
this.nspFiles = new HashMap<>();
|
||||||
this.isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
|
this.isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
|
||||||
|
|
||||||
if (isWindows)
|
if (isWindows)
|
||||||
|
@ -211,7 +213,7 @@ class NxdtUsbAbi1 {
|
||||||
String filename = new String(message, 0x20, fileNameLen, StandardCharsets.UTF_8);
|
String filename = new String(message, 0x20, fileNameLen, StandardCharsets.UTF_8);
|
||||||
String absoluteFilePath = getAbsoluteFilePath(filename);
|
String absoluteFilePath = getAbsoluteFilePath(filename);
|
||||||
File fileToDump = new File(absoluteFilePath);
|
File fileToDump = new File(absoluteFilePath);
|
||||||
|
NxdtNspFile nspFile = nspFiles.get(filename); // it could be null, but it's not a problem.
|
||||||
boolean nspTransferMode = false;
|
boolean nspTransferMode = false;
|
||||||
|
|
||||||
if (checkSizes(fullSize, headerSize))
|
if (checkSizes(fullSize, headerSize))
|
||||||
|
@ -226,7 +228,7 @@ class NxdtUsbAbi1 {
|
||||||
|
|
||||||
if (headerSize > 0){ // if NSP
|
if (headerSize > 0){ // if NSP
|
||||||
logPrinter.print("Receiving NSP file entry: '"+filename+"' ("+fullSize+" b)", EMsgType.INFO);
|
logPrinter.print("Receiving NSP file entry: '"+filename+"' ("+fullSize+" b)", EMsgType.INFO);
|
||||||
if (filename.equals(nspFile.getName())){
|
if (nspFiles.containsKey(filename)){
|
||||||
nspTransferMode = true;
|
nspTransferMode = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -263,13 +265,11 @@ class NxdtUsbAbi1 {
|
||||||
private boolean checkSizes(long fileSize, int headerSize) throws Exception{
|
private boolean checkSizes(long fileSize, int headerSize) throws Exception{
|
||||||
if (fileSize >= headerSize){
|
if (fileSize >= headerSize){
|
||||||
logPrinter.print("File size should not be equal to header size for NSP files!", EMsgType.FAIL);
|
logPrinter.print("File size should not be equal to header size for NSP files!", EMsgType.FAIL);
|
||||||
resetNsp();
|
|
||||||
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (fileSize < 0){ // It's possible to have files of zero-length, so only less is the problem
|
if (fileSize < 0){ // It's possible to have files of zero-length, so only less is the problem
|
||||||
logPrinter.print("File size should not be less then zero!", EMsgType.FAIL);
|
logPrinter.print("File size should not be less then zero!", EMsgType.FAIL);
|
||||||
resetNsp();
|
|
||||||
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,8 @@ class NxdtUsbAbi1 {
|
||||||
}
|
}
|
||||||
private void createNewNsp(String filename, int headerSize, long fileSize, File fileToDump) throws Exception{
|
private void createNewNsp(String filename, int headerSize, long fileSize, File fileToDump) throws Exception{
|
||||||
try {
|
try {
|
||||||
nspFile = new NxdtNspFile(filename, headerSize, fileSize, fileToDump);
|
NxdtNspFile nsp = new NxdtNspFile(filename, headerSize, fileSize, fileToDump);
|
||||||
|
nspFiles.putIfAbsent(filename, nsp);
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
logPrinter.print(e.getMessage(), EMsgType.FAIL);
|
logPrinter.print(e.getMessage(), EMsgType.FAIL);
|
||||||
|
@ -333,6 +334,8 @@ class NxdtUsbAbi1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// @see https://bugs.openjdk.java.net/browse/JDK-8146538
|
// @see https://bugs.openjdk.java.net/browse/JDK-8146538
|
||||||
private void dumpFile(File file, long size) throws Exception{
|
private void dumpFile(File file, long size) throws Exception{
|
||||||
FileOutputStream fos = new FileOutputStream(file, true);
|
FileOutputStream fos = new FileOutputStream(file, true);
|
||||||
|
@ -401,8 +404,7 @@ class NxdtUsbAbi1 {
|
||||||
|
|
||||||
private void handleSendNspHeader(byte[] message) throws Exception{
|
private void handleSendNspHeader(byte[] message) throws Exception{
|
||||||
final int headerSize = getLEint(message, 0x8);
|
final int headerSize = getLEint(message, 0x8);
|
||||||
NxdtNspFile nsp = nspFile;
|
NxdtNspFile nsp = nspFiles.remove( null ); // <---------------------- //TODO: PLEASE PUT FILENAME HERE
|
||||||
resetNsp();
|
|
||||||
|
|
||||||
if (nsp == null) {
|
if (nsp == null) {
|
||||||
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
writeUsb(USBSTATUS_MALFORMED_REQUEST);
|
||||||
|
@ -430,9 +432,6 @@ class NxdtUsbAbi1 {
|
||||||
|
|
||||||
writeUsb(USBSTATUS_SUCCESS);
|
writeUsb(USBSTATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
private void resetNsp(){
|
|
||||||
this.nspFile = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Sending any byte array to USB device **/
|
/** Sending any byte array to USB device **/
|
||||||
private void writeUsb(byte[] message) throws Exception{
|
private void writeUsb(byte[] message) throws Exception{
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.shape.SVGPath?>
|
<?import javafx.scene.shape.SVGPath?>
|
||||||
|
|
||||||
<AnchorPane fx:id="usbNetPane" onDragDropped="#handleDrop" onDragOver="#handleDragOver" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="nsusbloader.Controllers.GamesController">
|
<AnchorPane fx:id="usbNetPane" onDragDropped="#handleDrop" onDragOver="#handleDragOver" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="nsusbloader.Controllers.FrontController">
|
||||||
<children>
|
<children>
|
||||||
<VBox layoutX="10.0" layoutY="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<VBox layoutX="10.0" layoutY="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<children>
|
<children>
|
|
@ -23,7 +23,7 @@ Steps to roll NXDT functionality back:
|
||||||
<tabs>
|
<tabs>
|
||||||
<Tab closable="false">
|
<Tab closable="false">
|
||||||
<content>
|
<content>
|
||||||
<fx:include fx:id="GamesTab" source="GamesTab.fxml" VBox.vgrow="ALWAYS" />
|
<fx:include fx:id="FrontTab" source="FrontTab.fxml" VBox.vgrow="ALWAYS" />
|
||||||
</content>
|
</content>
|
||||||
<graphic>
|
<graphic>
|
||||||
<SVGPath content="M 19.953125 -0.00390625 C 19.945025 0.86963499 19.665113 1.3200779 19.117188 1.6679688 C 18.569261 2.0158596 17.688291 2.2107818 16.572266 2.2636719 C 14.340723 2.369428 11.22952 1.9408017 8.0175781 1.7636719 L 8.015625 1.7636719 C 5.8083004 1.6301338 3.850269 1.7145428 2.421875 2.328125 C 1.7074522 2.6350131 1.1147008 3.0945958 0.765625 3.7402344 C 0.41654922 4.3858729 0.3309909 5.1840438 0.50976562 6.0957031 L 0.515625 6.1269531 L 0.52539062 6.1582031 C 0.74516874 6.8214776 1.3043008 7.2559352 1.9550781 7.46875 C 2.6058554 7.6815648 3.3739015 7.7273729 4.2304688 7.703125 C 5.9436032 7.6546292 8.0253788 7.3082908 10.042969 7.1230469 C 12.060559 6.9378029 14.005763 6.9298258 15.349609 7.4511719 C 16.693456 7.972518 17.5 8.8951351 17.5 11 L 13.023438 11 L 10.837891 11 L 1 11 C 0.156581 11 -0.10111662 11.623241 -0.10351562 12.189453 C -0.10591562 12.759114 -0.10321863 13.218366 -0.10351562 13.919922 C -0.10353762 13.969822 -0.10345962 13.990156 -0.10351562 14.042969 C -0.10332363 14.492063 -0.10337263 14.807528 -0.10351562 15.150391 C -0.10359462 15.343113 -0.10438363 15.566512 -0.10351562 15.771484 C -0.10347763 15.861874 -0.10364063 15.971437 -0.10351562 16.064453 C -0.10316562 16.324274 -0.10337563 16.550139 -0.10351562 16.880859 C -0.10353662 16.930759 -0.10345962 16.951094 -0.10351562 17.003906 C -0.10317063 17.257044 -0.10337962 17.473987 -0.10351562 17.794922 C -0.10353762 17.844822 -0.10345962 17.863203 -0.10351562 17.916016 C -0.10380362 18.172294 -0.10461563 18.463892 -0.10351562 18.732422 C -0.10363862 18.825442 -0.10347763 18.935007 -0.10351562 19.025391 C -0.10359462 19.218111 -0.10438363 19.441511 -0.10351562 19.646484 C -0.10337262 19.98934 -0.10332563 20.306746 -0.10351562 20.755859 C -0.10353662 20.805759 -0.10345962 20.826093 -0.10351562 20.878906 C -0.10321564 21.580432 -0.10591562 22.037789 -0.10351562 22.607422 C -0.10111563 23.173608 0.156706 23.796875 1 23.796875 L 10.833984 23.796875 L 13.019531 23.796875 L 22.857422 23.796875 C 23.70084 23.796875 23.958538 23.17361 23.960938 22.607422 C 23.963338 22.037788 23.960642 21.580432 23.960938 20.878906 C 23.960959 20.829006 23.96088 20.808672 23.960938 20.755859 C 23.960749 20.306747 23.960795 19.989341 23.960938 19.646484 C 23.961015 19.453769 23.961803 19.230374 23.960938 19.025391 C 23.9609 18.935011 23.961059 18.825438 23.960938 18.732422 C 23.96059 18.472592 23.960799 18.246723 23.960938 17.916016 C 23.960959 17.866116 23.96088 17.847735 23.960938 17.794922 C 23.960642 17.093366 23.963337 16.63411 23.960938 16.064453 C 23.96106 15.971433 23.960898 15.861868 23.960938 15.771484 C 23.961015 15.578768 23.961803 15.355372 23.960938 15.150391 C 23.960797 14.807528 23.960748 14.492063 23.960938 14.042969 C 23.960959 13.993069 23.96088 13.972735 23.960938 13.919922 C 23.960642 13.218366 23.963337 12.759114 23.960938 12.189453 C 23.958538 11.623242 23.700715 11 22.857422 11 L 18.5 11 C 18.5 8.6048649 17.347496 7.152482 15.710938 6.5175781 C 14.074378 5.8826742 12.017906 5.9371971 9.9511719 6.1269531 C 7.8844382 6.3167092 5.7997949 6.6578708 4.2011719 6.703125 C 3.4018604 6.7257521 2.725744 6.6699978 2.265625 6.5195312 C 1.8171096 6.3728594 1.6083191 6.1804127 1.4941406 5.859375 C 1.3628245 5.141091 1.4300216 4.6115935 1.6445312 4.2148438 C 1.8648981 3.8072608 2.2462454 3.4910124 2.8164062 3.2460938 C 3.9567281 2.7562562 5.8156963 2.6320489 7.9570312 2.7617188 L 7.9589844 2.7617188 C 11.116926 2.9357557 14.220255 3.3773586 16.619141 3.2636719 C 17.818583 3.2068289 18.856796 3.0180713 19.654297 2.5117188 C 20.451798 2.0053661 20.942623 1.130365 20.953125 0.00390625 L 19.953125 -0.00390625 z M 4.4277344 13.271484 L 7 13.271484 L 7 16 L 9.71875 16 L 9.71875 18.5625 L 7 18.5625 L 7 21.291016 L 4.4277344 21.291016 L 4.4277344 18.5625 L 1.7089844 18.5625 L 1.7089844 16 L 4.4277344 16 L 4.4277344 13.271484 z M 20 14 A 1.9161212 1.9161212 0 0 1 21.916016 15.916016 A 1.9161212 1.9161212 0 0 1 20 17.832031 A 1.9161212 1.9161212 0 0 1 18.083984 15.916016 A 1.9161212 1.9161212 0 0 1 20 14 z M 16.421875 17.667969 A 1.9168563 1.9168563 0 0 1 18.337891 19.583984 A 1.9168563 1.9168563 0 0 1 16.421875 21.5 A 1.9168563 1.9168563 0 0 1 14.505859 19.583984 A 1.9168563 1.9168563 0 0 1 16.421875 17.667969 z " />
|
<SVGPath content="M 19.953125 -0.00390625 C 19.945025 0.86963499 19.665113 1.3200779 19.117188 1.6679688 C 18.569261 2.0158596 17.688291 2.2107818 16.572266 2.2636719 C 14.340723 2.369428 11.22952 1.9408017 8.0175781 1.7636719 L 8.015625 1.7636719 C 5.8083004 1.6301338 3.850269 1.7145428 2.421875 2.328125 C 1.7074522 2.6350131 1.1147008 3.0945958 0.765625 3.7402344 C 0.41654922 4.3858729 0.3309909 5.1840438 0.50976562 6.0957031 L 0.515625 6.1269531 L 0.52539062 6.1582031 C 0.74516874 6.8214776 1.3043008 7.2559352 1.9550781 7.46875 C 2.6058554 7.6815648 3.3739015 7.7273729 4.2304688 7.703125 C 5.9436032 7.6546292 8.0253788 7.3082908 10.042969 7.1230469 C 12.060559 6.9378029 14.005763 6.9298258 15.349609 7.4511719 C 16.693456 7.972518 17.5 8.8951351 17.5 11 L 13.023438 11 L 10.837891 11 L 1 11 C 0.156581 11 -0.10111662 11.623241 -0.10351562 12.189453 C -0.10591562 12.759114 -0.10321863 13.218366 -0.10351562 13.919922 C -0.10353762 13.969822 -0.10345962 13.990156 -0.10351562 14.042969 C -0.10332363 14.492063 -0.10337263 14.807528 -0.10351562 15.150391 C -0.10359462 15.343113 -0.10438363 15.566512 -0.10351562 15.771484 C -0.10347763 15.861874 -0.10364063 15.971437 -0.10351562 16.064453 C -0.10316562 16.324274 -0.10337563 16.550139 -0.10351562 16.880859 C -0.10353662 16.930759 -0.10345962 16.951094 -0.10351562 17.003906 C -0.10317063 17.257044 -0.10337962 17.473987 -0.10351562 17.794922 C -0.10353762 17.844822 -0.10345962 17.863203 -0.10351562 17.916016 C -0.10380362 18.172294 -0.10461563 18.463892 -0.10351562 18.732422 C -0.10363862 18.825442 -0.10347763 18.935007 -0.10351562 19.025391 C -0.10359462 19.218111 -0.10438363 19.441511 -0.10351562 19.646484 C -0.10337262 19.98934 -0.10332563 20.306746 -0.10351562 20.755859 C -0.10353662 20.805759 -0.10345962 20.826093 -0.10351562 20.878906 C -0.10321564 21.580432 -0.10591562 22.037789 -0.10351562 22.607422 C -0.10111563 23.173608 0.156706 23.796875 1 23.796875 L 10.833984 23.796875 L 13.019531 23.796875 L 22.857422 23.796875 C 23.70084 23.796875 23.958538 23.17361 23.960938 22.607422 C 23.963338 22.037788 23.960642 21.580432 23.960938 20.878906 C 23.960959 20.829006 23.96088 20.808672 23.960938 20.755859 C 23.960749 20.306747 23.960795 19.989341 23.960938 19.646484 C 23.961015 19.453769 23.961803 19.230374 23.960938 19.025391 C 23.9609 18.935011 23.961059 18.825438 23.960938 18.732422 C 23.96059 18.472592 23.960799 18.246723 23.960938 17.916016 C 23.960959 17.866116 23.96088 17.847735 23.960938 17.794922 C 23.960642 17.093366 23.963337 16.63411 23.960938 16.064453 C 23.96106 15.971433 23.960898 15.861868 23.960938 15.771484 C 23.961015 15.578768 23.961803 15.355372 23.960938 15.150391 C 23.960797 14.807528 23.960748 14.492063 23.960938 14.042969 C 23.960959 13.993069 23.96088 13.972735 23.960938 13.919922 C 23.960642 13.218366 23.963337 12.759114 23.960938 12.189453 C 23.958538 11.623242 23.700715 11 22.857422 11 L 18.5 11 C 18.5 8.6048649 17.347496 7.152482 15.710938 6.5175781 C 14.074378 5.8826742 12.017906 5.9371971 9.9511719 6.1269531 C 7.8844382 6.3167092 5.7997949 6.6578708 4.2011719 6.703125 C 3.4018604 6.7257521 2.725744 6.6699978 2.265625 6.5195312 C 1.8171096 6.3728594 1.6083191 6.1804127 1.4941406 5.859375 C 1.3628245 5.141091 1.4300216 4.6115935 1.6445312 4.2148438 C 1.8648981 3.8072608 2.2462454 3.4910124 2.8164062 3.2460938 C 3.9567281 2.7562562 5.8156963 2.6320489 7.9570312 2.7617188 L 7.9589844 2.7617188 C 11.116926 2.9357557 14.220255 3.3773586 16.619141 3.2636719 C 17.818583 3.2068289 18.856796 3.0180713 19.654297 2.5117188 C 20.451798 2.0053661 20.942623 1.130365 20.953125 0.00390625 L 19.953125 -0.00390625 z M 4.4277344 13.271484 L 7 13.271484 L 7 16 L 9.71875 16 L 9.71875 18.5625 L 7 18.5625 L 7 21.291016 L 4.4277344 21.291016 L 4.4277344 18.5625 L 1.7089844 18.5625 L 1.7089844 16 L 4.4277344 16 L 4.4277344 13.271484 z M 20 14 A 1.9161212 1.9161212 0 0 1 21.916016 15.916016 A 1.9161212 1.9161212 0 0 1 20 17.832031 A 1.9161212 1.9161212 0 0 1 18.083984 15.916016 A 1.9161212 1.9161212 0 0 1 20 14 z M 16.421875 17.667969 A 1.9168563 1.9168563 0 0 1 18.337891 19.583984 A 1.9168563 1.9168563 0 0 1 16.421875 21.5 A 1.9168563 1.9168563 0 0 1 14.505859 19.583984 A 1.9168563 1.9168563 0 0 1 16.421875 17.667969 z " />
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
package nsusbloader.com.usb;
|
|
||||||
|
|
||||||
import nsusbloader.ModelControllers.ILogPrinter;
|
|
||||||
import nsusbloader.NSLDataTypes.EFileStatus;
|
|
||||||
import nsusbloader.NSLDataTypes.EMsgType;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
public class NoLogPrinter implements ILogPrinter {
|
|
||||||
@Override
|
|
||||||
public void print(String message, EMsgType type) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgress(Double value) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void update(HashMap<String, File> nspMap, EFileStatus status) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void update(File file, EFileStatus status) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateOneLinerStatus(boolean status) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void close() { }
|
|
||||||
}
|
|
|
@ -2,6 +2,7 @@ package nsusbloader.com.usb;
|
||||||
|
|
||||||
import nsusbloader.ModelControllers.CancellableRunnable;
|
import nsusbloader.ModelControllers.CancellableRunnable;
|
||||||
import nsusbloader.ModelControllers.ILogPrinter;
|
import nsusbloader.ModelControllers.ILogPrinter;
|
||||||
|
import nsusbloader.ModelControllers.LogPrinterCli;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.DisplayName;
|
import org.junit.jupiter.api.DisplayName;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
@ -80,7 +81,7 @@ class TransferModuleTest{
|
||||||
filesMap.put(splitFileName10, splitFile10);
|
filesMap.put(splitFileName10, splitFile10);
|
||||||
filesMap.put(splitFileName11, splitFile11);
|
filesMap.put(splitFileName11, splitFile11);
|
||||||
|
|
||||||
ILogPrinter printer = new NoLogPrinter();
|
ILogPrinter printer = new LogPrinterCli();
|
||||||
this.transferModule = new TransferModuleImplementation((DeviceHandle)null, filesMap, (CancellableRunnable)null, printer);
|
this.transferModule = new TransferModuleImplementation((DeviceHandle)null, filesMap, (CancellableRunnable)null, printer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue