mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 22:54:49 -04:00
Add updated brazilian portuguese translation by @almircanella! #64
Refactor NETCommunications. Not it's readable :D A lot of small changes, code refactoring, updates and fixes.
This commit is contained in:
parent
96e85056dd
commit
267ffcf5d2
22 changed files with 553 additions and 522 deletions
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package nsusbloader.Utilities.nxdumptool;
|
||||
|
||||
import nsusbloader.COM.INSTask;
|
||||
import nsusbloader.COM.USB.UsbConnect;
|
||||
import nsusbloader.ModelControllers.ILogPrinter;
|
||||
import nsusbloader.ModelControllers.Log;
|
||||
|
@ -26,12 +25,10 @@ import nsusbloader.NSLDataTypes.EModule;
|
|||
import nsusbloader.NSLDataTypes.EMsgType;
|
||||
import org.usb4java.DeviceHandle;
|
||||
|
||||
public class NxdtTask implements INSTask {
|
||||
public class NxdtTask implements Runnable {
|
||||
|
||||
private ILogPrinter logPrinter;
|
||||
private String saveToLocation;
|
||||
|
||||
private volatile boolean cancel;
|
||||
private final ILogPrinter logPrinter;
|
||||
private final String saveToLocation;
|
||||
|
||||
public NxdtTask(String saveToLocation){
|
||||
this.logPrinter = Log.getPrinter(EModule.NXDT);
|
||||
|
@ -52,23 +49,12 @@ public class NxdtTask implements INSTask {
|
|||
|
||||
DeviceHandle handler = usbConnect.getNsHandler();
|
||||
|
||||
new NxdtUsbAbi1(handler, this, logPrinter, saveToLocation);
|
||||
new NxdtUsbAbi1(handler, logPrinter, saveToLocation);
|
||||
|
||||
logPrinter.print(".:: Complete ::.", EMsgType.PASS);
|
||||
|
||||
usbConnect.close();
|
||||
logPrinter.updateOneLinerStatus(true);
|
||||
logPrinter.close();
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue