コード例 #1
0
ファイル: UserSetting.cs プロジェクト: mcskik/Utilities
 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
ファイル: CommandSetting.cs プロジェクト: mcskik/Utilities
 public CommandSetting(object parent, XElement commandSetting)
     : base(parent, commandSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, commandSetting);
     Line     = _xmlProfileHelper.Fetch("Command", "Line");
     Template = _xmlProfileHelper.Fetch("Command", "Template");
 }
コード例 #3
0
 public RepositorySetting(object parent, XElement repositorySetting)
     : base(parent, repositorySetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, repositorySetting);
     Name      = _xmlProfileHelper.Fetch("Repository", "Name");
     RemoteUrl = _xmlProfileHelper.Fetch("Repository", "RemoteUrl");
     LocalPath = _xmlProfileHelper.Fetch("Repository", "LocalPath");
 }
コード例 #4
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");
 }
コード例 #5
0
 public TemplateParameterSetting(object parent, XElement templateParameterSetting)
     : base(parent, templateParameterSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, templateParameterSetting);
     Value             = _xmlProfileHelper.Fetch("Group", "Value");
     try
     {
         Description = _xmlProfileHelper.Fetch("Group", "Description");
     }
     catch (Exception ex)
     {
         Description = string.Empty;
     }
 }
コード例 #6
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);
     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");
 }
コード例 #7
0
ファイル: DiffUserSetting.cs プロジェクト: mcskik/Utilities
 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");
 }
コード例 #8
0
 public ParameterSetting(object parent, XElement parameterSetting)
     : base(parent, parameterSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, parameterSetting);
     Value             = _xmlProfileHelper.Fetch("Group", "Value");
 }