baby don't hurt me

This commit is contained in:
antoc0der 2023-12-18 20:01:51 +03:00
parent 146fdcaa94
commit f146a0ff06
4 changed files with 8 additions and 10 deletions

View File

@ -50,8 +50,8 @@ public class ExtentionDrawningAirplane {
getColor(strs[2]),
width,
height);
toRet.ChangeIlluminatorNumb(Integer.parseInt(strs[5]));
toRet.ChangeIDraw(Integer.parseInt(strs[6]));
toRet.ChangeIlluminatorNumb(Integer.parseInt(strs[3]));
toRet.ChangeIDraw(Integer.parseInt(strs[4]));
return toRet;
}
if(strs.length == 8){
@ -60,12 +60,12 @@ public class ExtentionDrawningAirplane {
Integer.parseInt(strs[1]),
getColor(strs[2]),
getColor(strs[3]),
Boolean.parseBoolean(strs[7]),
Boolean.parseBoolean(strs[8]),
Boolean.parseBoolean(strs[4]),
Boolean.parseBoolean(strs[5]),
width,
height);
toRet.ChangeIlluminatorNumb(Integer.parseInt(strs[5]));
toRet.ChangeIDraw(Integer.parseInt(strs[6]));
toRet.ChangeIlluminatorNumb(Integer.parseInt(strs[6]));
toRet.ChangeIDraw(Integer.parseInt(strs[7]));
return toRet;
}
return null;

View File

@ -135,10 +135,8 @@ public class FormAirplaneCollection {
JFileChooser fc = new JFileChooser("C:\\Users\\1\\Desktop\\свое");
fc.addChoosableFileFilter(new TxtSaveFilter());
int retrieval = fc.showSaveDialog(null);
if (retrieval == JFileChooser.APPROVE_OPTION) {
File file = new File(fc.getSelectedFile() + "." + "txt");
try {
if(listBoxStorages.getSelectedIndex() == -1) {
return;

View File

@ -29,7 +29,7 @@ public class AirplaneGenericCollection<T extends DrawningAirplane, U extends IMo
}
f.createNewFile();
StringBuilder data = new StringBuilder();
data.append("MonorailCollection\n");
data.append("AirplaneCollection\n");
data.append(String.format("%s\n", name));
StringBuilder records = new StringBuilder();
for(DrawningAirplane elem : GetAirplanes())

View File

@ -48,7 +48,7 @@ public class AirplaneGenericStorage {
var strs = bufferTextFromFile.toString().split("\n");
if(strs == null || strs.length == 0)
return false;
if (!strs[0].startsWith("MonorailStorage"))
if (!strs[0].startsWith("AirplaneStorage"))
return false;
_airplaneStorages.clear();
for(String data : strs){