Пример #1
0
        public void LoadSettingsFromText(string value)
        {
            XElement doc = XElement.Parse(value);

            if (doc != null)
            {
                SettingNode.ReplaceWith(doc);
                SaveSettings();
                if (OnSettingsChanged != null)
                {
                    OnSettingsChanged(this, null);
                }
            }
        }
Пример #2
0
 public void LoadSettings()
 {
     if (File.Exists(TaskSettingsFile))
     {
         _settingNode.Root.ReplaceWith(XDocument.Load(TaskSettingsFile).Root);
     }
     else
     {
         SettingNode.ReplaceWith(DefaultSettings);
     }
     if (OnSettingsChanged != null)
     {
         OnSettingsChanged(this, null);
     }
 }