SaveFileDialog
Wisej.Web.SaveFileDialog
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Prompts the user to select a location for saving a file on the server.
You can:
Override PromptFileNotFound. It's called when the specified file doesn't exist and the property CheckFileExists is true.
Override PromptFileCreate. It's called when the specified file doesn't exist and the property CreatePrompt is true.
Override PromptFileOverwrite. It's called when the specified file doesn't exist and the property OverwritePrompt is true.
Override CreateUI to create your custom Form when the method ShowDialog is called.
Set the DialogTemplate to a Form class that has a constructor that accepts FileDialog as the single argument to change the User Interface (UI) of the file dialog.
Override OnFileOk to provide your custom implementation of the actions to execute when the user presses the OK button.
You must add at least one IFileSystemProvider to the Roots collection before showing the dialog.
Constructors
Initializes a new instance of SaveFileDialog.
Initializes a new instance of the SaveFileDialog extender with a specified container.
Properties
Boolean: Returns or sets a value indicating whether the dialog box prompts the user for permission to create a file, if the file specified file does not exist.
Boolean: Returns or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that already exists.
Methods
Opens the file with read/write permission selected by the user.
Returns: Stream. A Stream that specifies the read/write file selected by the user.
Throws:
ArgumentNullException FileName is empty or null.
Receives the file names selected by the user and validates them according to the properties set in the FileDialog instance.
Returns: Boolean. True if the files have been validated and the dialog can close; otherwise false to keep the dialog open.
Resets all dialog box options to their default values.
Last updated