Exemplo n.º 1
0
        public DirectoryDiffResults Execute(DirectoryInfo A, DirectoryInfo B)
        {
            //Create a faux base entry to pass to Execute
            DirectoryDiffEntry Entry = new DirectoryDiffEntry("", false, true, true, false);

            //If the base paths are the same, we don't need to check for file differences.
            bool bCheckIfFilesAreDifferent = String.Compare(A.FullName, B.FullName, true) != 0;

            Execute(A, B, Entry, bCheckIfFilesAreDifferent);

            DirectoryDiffResults Results = new DirectoryDiffResults(A, B, Entry.SubEntries, m_bRecursive, m_Filter);
            return Results;
        }
Exemplo n.º 2
0
 public void SetData(DirectoryDiffResults Results, bool bUseA)
 {
     m_Results = Results;
     m_bUseA = bUseA;
     PopulateTree();
 }
Exemplo n.º 3
0
        public void SetData(DirectoryDiffResults Results)
        {
            edtA.Text = Results.A.FullName;
            edtB.Text = Results.B.FullName;

            TreeA.SetData(Results, true);
            TreeB.SetData(Results, false);

            //Set a filter description
            if (Results.Filter == null)
            {
                lblFilter.Text = "All Files";
            }
            else
            {
                DirectoryDiffFileFilter Filter = Results.Filter;
                lblFilter.Text = String.Format("{0}: {1}", Filter.Include ? "Includes" : "Excludes", Filter.FilterString);
            }

            UpdateButtons();

            if (TreeA.Nodes.Count > 0)
            {
                TreeA.SelectedNode = TreeA.Nodes[0];
            }
        }