}
return true;
}
private boolean checkBackedUp() {
Wini ini;
boolean answer = true;
try {
File settings = new File("me3mcc.ini");
if (!settings.exists())
settings.createNewFile();
ini = new Wini(settings);
String backupFlag = ini.get("Settings", "dlc_backup_flag");
if (backupFlag == null || !backupFlag.equals("1")) {
// backup flag not set, lets ask user
if (ModManager.logging) {
ModManager.debugLogger.writeMessage("Did not read the backup flag from settings or flag was not set to 1");
}
String YesNo[] = { "Yes", "No" }; // Yes/no buttons
int showDLCBackup = JOptionPane
.showOptionDialog(null, "This instance of Mod Manager hasn't backed up your DLC's yet;\nIf you have previously backed up using Mod Manager, you can ignore this message.\n\nBefore you install mods you should back them up in the event that you lose them.\n\nNote: This dialog will only be displayed once.\n\nOpen the backup manager window?", "Backup DLC before mod installation?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, YesNo, YesNo[0]);
// System.out.println("User chose: "+showDLCBackup);
if (showDLCBackup == 0) {
backupDLC(fieldBiogameDir.getText());
}
}
// shown only once. Backup complete, set to settings file
ini.put("Settings", "dlc_backup_flag", "1");
ini.store();
} catch (InvalidFileFormatException e) {
e.printStackTrace();
} catch (IOException e) {
System.err.println("Settings file encountered an I/O error while attempting to write it. Settings not saved.");
}