public static void save(ResearchGUI gui) { try { makeRunInfo(gui).save(gui.name()); } catch (Exception e) { gui.logAndAlert("failed to save settings", e); } }
public static void load(ResearchGUI gui, bool isStarting) { if (isEmpty(gui.name())) { if (!isStarting) { gui.alertUser("Fill in the Name box to continue."); } return; } var settings = file(gui.name()); if (!settings.exists()) { gui.alertUser("File missing:" + settings.path()); return; } LogC.verbose(() => "loading gui from file " + settings.path()); var serialized = settings.bytes(); var runInfo = (SystemRunInfo)deserialize(serialized); runInfo.loadOnto(gui); }