//private void btnSave_Click(object sender, EventArgs e) //{ // if (xmlLoc == "" || !File.Exists(xmlLoc)) // xmlLoc = Helper.userGetXMLLoc(); // if (xmlLoc != "") // { // XMLSettings.WriteXML(new XMLSettings.Settings() { SoundHotkeys = soundHotkeys.ToArray() }, xmlLoc); // MessageBox.Show("Saved"); // } //} public void AutoSave() { XMLSettings.WriteXML(new XMLSettings.Settings() { SoundHotkeys = soundHotkeys.ToArray() }, Path.GetDirectoryName(Application.ExecutablePath) + "\\AHS-autosave.xml"); }
private void btnSaveAs_Click(object sender, EventArgs e) { string last = xmlLoc; xmlLoc = Helper.userGetXMLLoc(); if (xmlLoc == "") { xmlLoc = last; } else if (last != xmlLoc) { XMLSettings.WriteXML(new XMLSettings.Settings() { SoundHotkeys = soundHotkeys.ToArray() }, xmlLoc); } }