private void BaseGUI_FormClosing(object sender, FormClosingEventArgs e) { if (!IS_DEBUG) { //Instantiate ConfigWriter and write saved hotkeys. ConfigWriter c = new ConfigWriter(); c.WriteConfig(this.HotKeys); if (HotKeys != null) { foreach (HotKey entry in HotKeys) { UnregisterHotKey(Handle, entry.Id); } } } else { HotKey p = new HotKey(0, 0, Keys.P); UnregisterHotKey(Handle, p.Id); } }
public static string WriteConfig() { var model = EasyInstallConfigFile.Get(); return(ConfigWriter.WriteConfig(model)); }