/// <summary> /// Makes all exclude rules in the collection relative. /// </summary> /// <param name="collection">A collection of exclude rules to make relative.</param> /// <returns>A value indicating whether any rule was changed.</returns> private bool MakeRelative(ExcludeRuleCollection collection) { bool changed = false; foreach (var rule in collection) { if (System.IO.Path.IsPathRooted(rule.FileName)) { var relative = this.GetRelativePath(rule.FileName); if (rule.FileName != relative) { changed = true; } rule.FileName = relative; } } return changed; }
public ExcludeListControl() { this.InitializeComponent(); this.collection = new ExcludeRuleCollection(); }