コード例 #1
0
ファイル: SystemProfile.cs プロジェクト: mcskik/Utilities
 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");
 }
コード例 #2
0
ファイル: UserSetting.cs プロジェクト: mcskik/Utilities
        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");
        }