Пример #1
0
 public UserSetting(object parent, XElement userSetting)
     : base(parent, userSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, userSetting);
     SearchPath        = _xmlProfileHelper.Fetch("Parameters", "SearchPath");
     Criteria          = _xmlProfileHelper.Fetch("Parameters", "Criteria");
     Find             = _xmlProfileHelper.Fetch("Parameters", "Find");
     Replacement      = _xmlProfileHelper.Fetch("Parameters", "Replacement");
     Mode             = _xmlProfileHelper.Fetch("Parameters", "Mode");
     DirFilesEstimate = _xmlProfileHelper.FetchLong("Parameters", "DirFilesEstimate");
     FilePattern      = _xmlProfileHelper.Fetch("Parameters", "FilePattern");
     RegexCriteria    = _xmlProfileHelper.FetchBool("Parameters", "RegexCriteria");
     AllTypes         = _xmlProfileHelper.FetchBool("Parameters", "AllTypes");
     Encoding         = GetEnumValue <SearchEncoding>(_xmlProfileHelper.Fetch("Parameters", "Encoding"));
     Options          = new StringCollection();
     foreach (string opt in userSetting.Descendants("Option"))
     {
         Options.Add(opt);
     }
     Extensions = new StringCollection();
     foreach (string ext in userSetting.Descendants("Extension"))
     {
         Extensions.Add(ext);
     }
     DirectoryExclusions = new StringCollection();
     foreach (string exclusion in userSetting.Descendants("DirectoryExclusion"))
     {
         DirectoryExclusions.Add(exclusion);
     }
 }
Пример #2
0
 public UserSetting(object parent, XElement userSetting)
     : base(parent, userSetting)
 {
     _shrink = new ShrinkDir();
     _shrink.MaxDisplayLength = 49;
     _xmlProfileHelper        = new XmlProfileHelper(ProfileCache, userSetting);
     NewPath             = _xmlProfileHelper.Fetch("Directories", "NewPath");
     OldPath             = _xmlProfileHelper.Fetch("Directories", "OldPath");
     NewFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "NewFilesEstimate");
     OldFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "OldFilesEstimate");
     ChgFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "ChgFilesEstimate");
     KeyShrunk           = "[" + _shrink.ShrinkDirectory(NewPath) + "]-[" + _shrink.ShrinkDirectory(OldPath) + "]";
     IgnoreFileExtension = _xmlProfileHelper.FetchBool("Options", "IgnoreFileExtension");
     MonitoredTypesOnly  = _xmlProfileHelper.FetchBool("Options", "MonitoredTypesOnly");
 }
Пример #3
0
 public DiffUserSetting(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");
     NewFile           = _xmlProfileHelper.Fetch("Files", "NewFile");
     OldFile           = _xmlProfileHelper.Fetch("Files", "OldFile");
     KeyShrunk         = "[" + _shrink.ShrinkDirectory(NewFile) + "]-[" + _shrink.ShrinkDirectory(OldFile) + "]";
     MinChars          = _xmlProfileHelper.FetchInt("Options", "MinChars");
     MinLines          = _xmlProfileHelper.FetchInt("Options", "MinLines");
     LimitCharacters   = _xmlProfileHelper.FetchInt("Options", "LimitCharacters");
     LimitLines        = _xmlProfileHelper.FetchInt("Options", "LimitLines");
     SubLineMatchLimit = _xmlProfileHelper.FetchInt("Options", "SubLineMatchLimit");
     CompleteLines     = _xmlProfileHelper.FetchBool("Options", "CompleteLines");
 }