TryLoad() public static method

public static TryLoad ( string path ) : System.Xml.Linq.XElement
path string
return System.Xml.Linq.XElement
Example #1
0
 private void SetValue(string element, string attribute, object value)
 {
     if (this._xel == null)
     {
         this._xel = Tools.TryLoad(this.FilePath);
     }
     try
     {
         this._xel.Element(element).Attribute(attribute).Value = value.ToString();
     }
     catch
     {
     }
 }
Example #2
0
 public static void LoadTheme(string xmlFile)
 {
     _themeXel = Tools.TryLoad(Path.Combine(UserSettings.ThemesDir, xmlFile));
     FilePath  = Path.Combine(UserSettings.ThemesDir, xmlFile);
 }