[]
        
(Showing Draft Content)

C1.Win.C1Preview.C1PreviewPane.FileOpen

FileOpen Method

FileOpen()

Shows a file open dialog, allows the user to select a C1DX or C1D file, and loads the selected file into the current preview pane. If an exception occurs while loading the file, an error message is displayed, and the method returns false.

Declaration
public bool FileOpen()
Returns
Type Description
bool

true if the file was successfully loaded, false if an error occurred or the user cancelled the dialog.

Remarks

If a handler is assigned to the Error event, that handler is invoked but no message is shown to the user.

See Also

FileOpen(string)

Loads the specified file (which must be a valid C1DX, C1D or C1MDX document) into the current preview pane.

If fileName does not exist or is a directory, shows the file open dialog and allows the user to select a file to load. In that case fileName specifies the initial directory for the dialog.

Declaration
public bool FileOpen(string fileName)
Parameters
Type Name Description
string fileName

The name of the file to load, or the initial directory for the file open dialog.

Returns
Type Description
bool

true if the file was successfully loaded, false if an error occurred or the user cancelled the dialog.

Remarks

If a handler is assigned to the Error event, that handler is invoked but no message is shown to the user.

See Also