Add license reset function

master
skylarmt 9 years ago
parent df4ad2531c
commit 45fe46ad33

@ -189,13 +189,29 @@ public class Functions {
Other
*/
public String sysinfo() {
String info = "==Java System Information==\n";
String info = "==Java Information==\n";
info += "Java version: " + System.getProperty("java.version");
info += "\nJava vendor: " + System.getProperty("java.vendor");
info += "\nJava home: " + System.getProperty("java.home");
return info;
}
/**
* Reset the license, quit the application.
*/
public void resetlicense() {
int result = JOptionPane.showConfirmDialog(null,
"Are you sure you want to reset your license?\n"
+ "This will close SyMAT and all open files!",
"Reset license",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
PrefStorage.unset("license");
System.exit(0);
}
}
/**
* Make sure the graph window shows.
*/

@ -47,7 +47,10 @@ public class PrefStorage {
}
public static void unset(String key) {
saveSetting(key, "");
save();
prefs.remove(key);
save();
}
public static String getSetting(String key) {

Loading…
Cancel
Save