public void Load() { XDoc = XDocument.Load(ProfileCache.Fetch("SystemProfileXml")); XmlProfileHelper = new XmlProfileHelper(ProfileCache, XDoc.Root); XmlProfileHelper.FetchAll("Parameters"); XmlProfileHelper.FetchAll("Directories"); XmlProfileHelper.FetchAll("Files"); XmlProfileHelper.FetchAll("Programs"); }
public UserSetting(object parent, XElement userSetting) : base(parent, userSetting) { _shrink = new ShrinkDir(); _shrink.MaxDisplayLength = 49; _xmlProfileHelper = new XmlProfileHelper(ProfileCache, userSetting); NewBaseDir = _xmlProfileHelper.Fetch("Directories", "NewBaseDir"); OldBaseDir = _xmlProfileHelper.Fetch("Directories", "OldBaseDir"); KeyShrunk = "[" + _shrink.ShrinkDirectory(NewBaseDir) + "]-[" + _shrink.ShrinkDirectory(OldBaseDir) + "]"; string rule = _xmlProfileHelper.Fetch("Options", "CopyRule"); CopyRuleEnum copyRule = CopyRuleEnum.ReplaceOnlyWithNewer; Enum.TryParse(rule, out copyRule); CopyRule = copyRule; MonitoredTypesOnly = _xmlProfileHelper.FetchBool("Options", "MonitoredTypesOnly"); }