This object represents an image comparison window. The window isn’t necessarily visible on screen and can be used either to perform file comparison services for a client, or to present file comparisons on the screen to the user.
Use the methods and properties exposed by this object to perform image file comparisons, and to alter the appearance of an image file comparison window.
Once the comparison represented by this object is closed, the handler for the Close event provides the final opportunity to access methods and properties. Accessing them after this time will result in an error.
Properties
Activeread/writeICommonUI
The active state of the comparison window.
IDL |
[propget] HRESULT Active([out, retval] VARIANT_BOOL* pValue)
|
---|---|
.NET | Boolean Active[get, set] |
AllUnresolvedConflictsread-onlyIFileComparison
Not currently used.
AutoSaveOnCloseread/writeIFileComparison
Not currently used.
ComparisonErrorread-onlyIFileComparison
The error (if any) that was encountered by the Compare
method.
IDL |
[propget] HRESULT ComparisonError(
|
---|---|
.NET | FileComparisonError
get_ComparisonError( |
nFilePair
optional
Specifies whether to return results for files 0 and 1 (whennFilePair = 0
, the default) or files 1 and 2 (whennFilePair = 1
).
ComparisonResultread-onlyIFileComparison
The result (fcrSame
, fcrDifferent
, fcrError
) of the comparison performed by the Compare
method.
IDL |
[propget] HRESULT ComparisonResult(
|
---|---|
.NET | FileComparisonResult
get_ComparisonResult( |
nFilePair
optional
Specifies whether to return results for files 0 and 1 (whennFilePair = 0
, the default) or files 1 and 2 (whennFilePair = 1
).
ErrorInforead/writeIFileComparison
Provides detailed information about errors encountered while loading/comparing one of the files. If nFile
is -1
, then errors that applied to all three files (for example, out of memory errors) are returned.
IDL |
[propget] HRESULT ErrorInfo(
|
---|---|
.NET | String
get_ErrorInfo( |
nFile
The file (0, 1, or 2) to get error information for. A value of-1
can also be specified to denote all files.
Heightread/writeICommonUI
The height of the comparison window in pixels.
IDL |
[propget] HRESULT Height([out, retval] long* pValue)
|
---|---|
.NET | Int32 Height[get, set] |
Leftread/writeICommonUI
The location of the left edge pixel coordinate of the comparison window.
IDL |
[propget] HRESULT Left([out, retval] long* pValue)
|
---|---|
.NET | Int32 Left[get, set] |
Maximizedread/writeICommonUI
The maximized state of the comparison window.
IDL |
[propget] HRESULT Maximized([out, retval] VARIANT_BOOL* pValue)
|
---|---|
.NET | Boolean Maximized[get, set] |
Minimizedread/writeICommonUI
The minimized state of the comparison window.
IDL |
[propget] HRESULT Minimized([out, retval] VARIANT_BOOL* pValue)
|
---|---|
.NET | Boolean Minimized[get, set] |
Modifiedread/writeIFileComparison
Not currently used.
NumberOfChangesread-onlyIFileComparison
The number of pixels that have changed between the two images. A changed pixel in a given location in both images counts as one change. Inserted and removed pixels (resulting from different image sizes) count as one change each.
IDL |
[propget] HRESULT NumberOfChanges(
|
---|---|
.NET | Int32
get_NumberOfChanges( |
nFilePair
optional
Specifies whether to return the number of changes between files 0 and 1 (whennFilePair = 0
, the default) or files 1 and 2 (whennFilePair = 1
).
PromptForUnsavedFilesread/writeIFileComparison
Not currently used.
ReadOnlyread/writeIFileComparison
Not currently used.
SaveFileNameread/writeIFileComparison
Not currently used.
ThreeWayMergeActionsread-onlyIFileComparison
Not currently used.
Topread/writeICommonUI
The location of the top edge pixel coordinate of the comparison window.
IDL |
[propget] HRESULT Top([out, retval] long* pValue)
|
---|---|
.NET | Int32 Top[get, set] |
UnresolvedConflictsread-onlyIFileComparison
Not currently used.
ViewTyperead/writeIComparison
The comparison type (two way or three way layout).
IDL |
[propget] HRESULT ViewType([out, retval] FileViewType* pValue)
|
---|---|
.NET | FileViewType ViewType[get, set] |
Visibleread/writeICommonUI
The visible state of the comparison window.
IDL |
[propget] HRESULT Visible([out, retval] VARIANT_BOOL* pValue)
|
---|---|
.NET | Boolean Visible[get, set] |
Widthread/writeICommonUI
The width of the comparison window in pixels.
IDL |
[propget] HRESULT Width([out, retval] long* pValue)
|
---|---|
.NET | Int32 Width[get, set] |
Methods
CloseICommonUI
Closes the comparison window.
IDL |
HRESULT Close()
|
---|---|
.NET | void Close() |
CompareIComparison
Compares two or three files. This method is synchronous. A ComparisonComplete
event 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
CompareAsyncIFileComparison
Compares two or three files. This method is asynchronous (returns before the comparison completes). A ComparisonComplete
event is fired when the comparison is finished to report errors and results.
IDL |
HRESULT CompareAsync(
|
---|---|
.NET | void CompareAsync( |
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
GiveUserControlICommonUI
Gives control over the lifetime of the comparison window to the user. Merge will not automatically close the window when outstanding automation references are released.
IDL |
HRESULT GiveUserControl()
|
---|---|
.NET | void GiveUserControl() |
PrintIComparison
Prints the file comparison.
IDL |
HRESULT Print(
|
---|---|
.NET | void Print( |
bShowPrinterDialog
Defaults tofalse
. Whether to show the printer dialog to the user before printing.nOrientation
Defaults topoLandscape
. 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
Not currently used.
Report2IComparison
Not currently used.
RestoreICommonUI
Restores the comparison window from minimized or maximised state to its normal resizable state.
IDL |
HRESULT Restore()
|
---|---|
.NET | void Restore() |
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.
SaveFileIFileComparison
Not currently used.
SaveFileAsIFileComparison
Not currently used.
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.
ThreeWayMergeIFileComparison
Not currently used.
Events
CloseIFileComparisonEvents
The file comparison window was closed by the user.
IDL |
HRESULT Close()
|
---|---|
.NET | void Close() |
ComparisonCompleteIFileComparisonEvents
Occurs when a file comparison completes. For comparisons between two files, only the first two arguments are defined. For comparisons between three files, all four arguments are defined.
IDL |
HRESULT ComparisonComplete(
|
---|---|
.NET | void ComparisonComplete( |
error1
The error, if any, that occurred during the comparison of the first and second files.result1
The result of the comparison between the first and second files.error2
optional
The error, if any, that occurred during the comparison of the second and third files.result2
optional
The result of the comparison between the second and third files.