[]
        
(Showing Draft Content)

C1.Win.C1Preview.C1PreviewFileActions.FileOpen

FileOpen Method

FileOpen(string, bool)

Loads the document from a specified file. If the file does not exist uses its directory as the initial directory for the "open file" dialog.

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

The name of the file to open.

bool showErrorMessage

If true, error message is shown if an exception occurs, otherwise the exception is rethrown.

Returns
Type Description
object

The opened document or null if operation was cancelled, or if showErrorMessage is true and an error occurred while loading the document.

FileOpen(string)

Loads the document from a specified file. If the file does not exist uses its directory as the initial directory for the "open file" dialog.

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

The name of the file to open.

Returns
Type Description
object

The opened document or null if operation was cancelled or there was an error while loading the document.

FileOpen()

Shows the "open file" dialog allowing the user to select a document to open, and then opens it.

Declaration
public object FileOpen()
Returns
Type Description
object

The opened document or null if operation was cancelled or there was an error while loading the document.