Add screenshots. Remove ul.cfg in case user removed all records inside.
continuous-integration/drone/push Build is passing Details

master
Dmitry Isaenko 2022-09-24 23:42:34 +03:00
parent ecc586d82a
commit 42f16777fe
4 changed files with 12 additions and 3 deletions

View File

@ -4,7 +4,8 @@
OPL-compatible PS2 tool for making split files. Sort of ul.cfg manager or USBUtil.
![Application screenshot](screenshots/1.png)
![Application screenshot1](screenshots/1.png)
![Application screenshot2](screenshots/2.png)
#### Let's stay in touch

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 46 KiB

BIN
screenshots/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -32,6 +32,7 @@ import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.JTableHeader;
import java.awt.*;
import java.io.File;
import java.nio.file.Files;
import java.util.*;
import java.util.List;
@ -49,6 +50,7 @@ public class UpdateUlTableUi extends JFrame {
super();
this.resourceBundle = ResourceBundle.getBundle("locale");
this.ulLocationLbl = new JLabel(ulDestinationLocation);
this.recentRomLocation = ulDestinationLocation;
setupTable();
setupSaveButton();
@ -86,7 +88,6 @@ public class UpdateUlTableUi extends JFrame {
setTitle(resourceBundle.getString("ulManager"));
File ulCfgFile = new File(ulDestinationLocation + File.separator + "ul.cfg");
this.recentRomLocation = ulDestinationLocation;
if (ulCfgFile.exists())
showInTableUlCfgFile(ulCfgFile);
}
@ -151,6 +152,7 @@ public class UpdateUlTableUi extends JFrame {
}
saveChangesBtn.setEnabled(true);
ulLocationLbl.setText(ulCfgFile.getParentFile().getAbsolutePath());
statusLbl.setText(ulCfgFile.getAbsolutePath());
}
catch (Exception e){
@ -193,7 +195,13 @@ public class UpdateUlTableUi extends JFrame {
// Write new ul.cfg
UlServiceTools.writeUlCfgFile(ulLocation, finalConfigurationSet);
File ulCfgFile = new File(ulLocation+File.separator+"ul.cfg");
showInTableUlCfgFile(ulCfgFile);
if (ulCfgFile.length() == 0) {
Files.deleteIfExists(ulCfgFile.toPath());
saveChangesBtn.setEnabled(false);
}
else {
showInTableUlCfgFile(ulCfgFile);
}
statusLbl.setText(resourceBundle.getString("SuccessText"));
}