This interface provides access to properties and methods that are common to comparisons and is implemented by the TextComparison Object, BinaryComparison Object, ImageComparison Object, and FolderComparison Object.
Properties
ViewTyperead/writeIComparison
The comparison type (two way or three way layout).
IDL |
[propget] HRESULT ViewType([out, retval] FileViewType* pValue)
|
---|---|
.NET | FileViewType ViewType[get, set] |
Methods
CompareIComparison
Compares two or three files. This method is synchronous. An event ComparisonComplete is fired when the comparison is finished to report errors and results.
IDL |
HRESULT Compare(
|
---|---|
.NET | void Compare( |
strFirstFile
The fully qualified path to the first filestrSecondFile
The fully qualified path to the second filestrThirdFile
optional
The fully qualified path to the third file
PrintIComparison
Prints the file comparison.
IDL |
HRESULT Print(
|
---|---|
.NET | void Print( |
bShowPrinterDialog
Defaults to FALSE. Whether to show the printer dialog to the user before printing.nOrientation
Defaults to poLandscape. Whether to print in portrait or landscape mode.
RefreshIComparison
Recompares the files displayed in the window. This will cause any unsaved changes to be discarded.
IDL |
HRESULT Refresh()
|
---|---|
.NET | void Refresh() |
ReportIComparison
Generates a report for the file comparison.
IDL |
HRESULT Report(
|
---|---|
.NET | void Report( |
bstrReporter
The short-name of the reporter that should be used to generate the report. Valid names are “xml”, “html”, “htmlslideshow”, and “diff”. Please note that not all reporters support the generation of three-way comparison reports.nLineEndingStyle
The type of line-ending to use in the generated report file(s).strOutputFile
The name of the output file for the report. If the reporter generates more than one file, those files will have names based on this one.
Report2IComparison
Generates a report for the file comparison.
IDL |
HRESULT Report2(
|
---|---|
.NET | void Report2( |
bstrReporter
The short-name of the reporter that should be used to generate the report. Valid names are “xml”, “html”, “htmlslideshow”, and “diff”. Please note that not all reporters support the generation of three-way comparison reports.nLineEndingStyle
The type of line-ending to use in the generated report file(s).vtEncoding
The character encoding to use for the generated report. It can either be a code page number, or one of the following strings: ‘UCS2’ (Unicode UCS2), ‘UCS2-BE’ (Unicode UCS2 big endian), ‘UTF8’ (Unicode UTF8 with byte-order marker), ‘UTF8-NOBOM’ (Unicode UTF8 without byte-order marker), ‘UTF7’ (Unicode UTF7).strOutputFile
The name of the output file for the report. If the reporter generates more than one file, those files will have names based on this one.
SaveComparisonIComparison
Saves the comparison to a file. We recommend that you use the .cmp7
extension in the filename.
IDL |
HRESULT SaveComparison(
|
---|---|
.NET | void SaveComparison( |
filename
The name of the file to which the comparison should be saved.
SetPanelTitlesIComparison
Sets the titles shown above the file panels.
IDL |
HRESULT SetPanelTitles(
|
---|---|
.NET | void SetPanelTitles( |
strFirst
The title for the first file panel.strSecond
The title for the second file panel.strThird
optional
The title for the third file panel.