Beispiel #1
0
 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");
 }
Beispiel #2
0
        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");
        }