Exemple #1
0
        private string GetFolderColor(DirEntry dirEntry, CompareStatus blueStatus, CompareStatus redStatus, CompareStatus grayStatus)
        {
            var colors = new List<string>();

            if (dirEntry.CompareStatuses.Contains(blueStatus))
            {
                colors.Add("Blue");
            }

            if (dirEntry.CompareStatuses.Contains(redStatus))
            {
                colors.Add("Red");
            }

            if (dirEntry.CompareStatuses.Contains(CompareStatus.NotEqual) ||
                dirEntry.CompareStatuses.Contains(grayStatus) ||
                dirEntry.CompareStatuses.Contains(CompareStatus.Unknown))
            {
                colors.Add("Gray");
            }

            if (colors.Count >= 2)
            {
                return colors[0] + colors[1];
            }
            else if (colors.Count == 1)
            {
                return colors[0];
            }
            else
            {
                return "Black";
            }
        }
Exemple #2
0
 public Entry CompareDirectories(string leftDirPath, string rightDirPath, CompareOptions options)
 {
     var dirEntry = new DirEntry { Left = new DirItem(leftDirPath), Right = new DirItem(rightDirPath) };
     dirEntry.Populate();
     dirEntry.Compare(FileComparerFactory.Create(options));
     return dirEntry;
 }