|
@@ -1509,6 +1509,27 @@ public class GUI<E> implements CategoryListener {
|
|
tableHolonElementScrollPane.setBorder(null);
|
|
tableHolonElementScrollPane.setBorder(null);
|
|
|
|
|
|
frmCyberPhysical.getContentPane().add(timePanel, BorderLayout.SOUTH);
|
|
frmCyberPhysical.getContentPane().add(timePanel, BorderLayout.SOUTH);
|
|
|
|
+
|
|
|
|
+ String autoPath = System.getProperty("user.home") + "/HolonGUI/Autosave/";
|
|
|
|
+ File dest = new File(autoPath);
|
|
|
|
+ if(dest.listFiles().length>1){
|
|
|
|
+ int dialogButton = JOptionPane.YES_NO_OPTION;
|
|
|
|
+ int dialogResult = JOptionPane.showConfirmDialog (null, "Old autosave file was found, should it be loaded?", "Warning",dialogButton);
|
|
|
|
+ if(dialogResult == JOptionPane.YES_OPTION){
|
|
|
|
+ model.setAutoSaveNr(dest.listFiles().length-1);
|
|
|
|
+ mntmRedo.doClick();
|
|
|
|
+ }else{
|
|
|
|
+ controller.deleteDirectory(dest);
|
|
|
|
+ dest.mkdirs();
|
|
|
|
+ try {
|
|
|
|
+ controller.autoSave();
|
|
|
|
+ } catch (IOException e1) {
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
+ e1.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|