Esempio n. 1
0
        //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");
        }
Esempio n. 2
0
        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);
            }
        }