public void LoadSettingsFromText(string value) { XElement doc = XElement.Parse(value); if (doc != null) { SettingNode.ReplaceWith(doc); SaveSettings(); if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } } }
public void LoadSettings() { if (File.Exists(TaskSettingsFile)) { _settingNode.Root.ReplaceWith(XDocument.Load(TaskSettingsFile).Root); } else { SettingNode.ReplaceWith(DefaultSettings); } if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } }