TryLoad() публичный статический Метод

public static TryLoad ( string path ) : System.Xml.Linq.XElement
path string
Результат System.Xml.Linq.XElement
Пример #1
0
        private void SetValue(string element, string attribute, object value)
        {
            if (_xel == null)
            {
                _xel = Tools.TryLoad(FilePath);
            }
            var xElement = _xel.Element(element);

            if (xElement != null)
            {
                xElement.Attribute(attribute).Value = value.ToString();
            }
        }
Пример #2
0
 public static void LoadTheme(string xmlFile)
 {
     _themeXel = Tools.TryLoad(Path.Combine(UserSettings.ThemesDir, xmlFile));
     FilePath  = Path.Combine(UserSettings.ThemesDir, xmlFile);
 }