private void LoadSettingsFromFile(string name) { XmlDocument xd = new XmlDocument(); xd.Load(name); XmlLoad xl = new XmlLoad(xd); ApplySettings(xl); }
private void loadSettingsFromFile(string path) { try { XmlDocument xd = new XmlDocument(); xd.Load(path); XmlLoad xl = new XmlLoad(xd); loadControls(xl); Microsoft.Win32.Registry.SetValue( Microsoft.Win32.Registry.CurrentUser.Name + @"\Software\Enchanted Age\Gear Generator\Export", @"lastSettingsFile", path); } catch (System.Exception x) { MessageBox.Show( "Loading from " + path + " failed:\n" + x.Message, "Load Settings Error"); } }