public void Reset(int n, VisualGitDiffArgs args) { _nFrame = n; Clear(); Collection<string> A, B; GetFileLines(args.BaseFile, args.MineFile, out A, out B); TextDiff Diff = new TextDiff(HashType.HashCode, false, false); EditScript Script = Diff.Execute(A, B); string strCaptionA = args.BaseTitle ?? Path.GetFileName(args.BaseFile); string strCaptionB = args.MineTitle ?? Path.GetFileName(args.MineFile); //VisualGit.Diff.FileName fnA = new VisualGit.Diff.FileName(mine); //VisualGit.Diff.FileName fnB = new VisualGit.Diff.FileName(theirs); diffControl1.SetData(A, B, Script, strCaptionA, strCaptionB); ToolWindowHost.Title = Path.GetFileName(args.MineFile) + " - Diff"; }
/// Sets the diff data private void ShowDifferences(string mine, string theirs) { Collection<string> A, B; GetFileLines(mine, theirs, out A, out B); TextDiff Diff = new TextDiff(HashType.HashCode, false, false); EditScript Script = Diff.Execute(A, B); string strCaptionA = "Mine"; string strCaptionB = "Theirs"; //VisualGit.Diff.FileName fnA = new VisualGit.Diff.FileName(mine); //VisualGit.Diff.FileName fnB = new VisualGit.Diff.FileName(theirs); diffControl.SetData(A, B, Script, strCaptionA, strCaptionB); }