All pages
Powered by GitBook
1 of 12

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Common Dialogs

ColorDialog

Wisej.Web.ColorDialog

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

  • CommonDialog

    • ColorDialog

Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors.

Constructors

ColorDialog()

Initializes a new instance of .

ColorDialog(container)

Initializes a new instance of the extender with a specified container.

Name
Type
Description

Properties

Color

: Returns or sets the color selected by the user.

CustomColors

: Returns or sets the set of custom colors shown in the dialog box.

Methods

Reset()

Resets all properties to their default values.

container

IContainer

An IContainer that represents the container of the ColorDialog component.

Public Class ColorDialog
    Inherits CommonDialog
ColorDialog
ColorDialog
Color
Color[]
public class ColorDialog : CommonDialog

FileDialogUI

Wisej.Web.FileDialogUI

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

  • Control

    • ScrollableControl

UI implementation for the FileDialog class.

Constructors

FileDialogUI()

FileDialogUI(fileDialog)

Name
Type
Description

Implements

Name
Description

FileDialogRootCollection

Wisej.Web.FileDialogRootCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Represent a collection of the root file systems shown by the implementation.

Allows an object to serialize itself.

fileDialog

FileDialog

IBindableComponent

Bindable components implement this interface.

IContainerControl

Provides the functionality for a control to act as a parent for other controls.

IWisejComponent

All wisej components implement this interface.

IWisejControl

All wisej controls derived from the Control class must implement this interface.

IWisejWindow

All wisej top-level windows implement this interface.

ContainerControl
Form
FileDialogUI
Public Class FileDialogUI
    Inherits Form
public class FileDialogUI : Form

Methods

MapPath(filePath)

Maps the virtual path to the corresponding physical path on the specific IFileSystemProvider implementation.

Parameter
Type
Description

filePath

Virtual path to map to the corresponding physical path.

Returns: String. The physical path for the IFileSystemProvider implementation.

IFileSystemProvider
FileDialog
Public Class FileDialogRootCollection
    Inherits List(Of )
public class FileDialogRootCollection : List<>

FolderBrowserDialogUI

Wisej.Web.FolderBrowserDialogUI

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

  • Control

    • ScrollableControl

UI implementation for the FolderDialog class.

Constructors

FolderBrowserDialogUI()

FolderBrowserDialogUI(folderDialog)

Name
Type
Description

Implements

Name
Description

FolderBrowserDialog

Wisej.Web.FolderBrowserDialog

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Allows the user to select a folder from one of the

FileDialogLoadPathEventArgs

Wisej.Web.FileDialogLoadPathEventArgs

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Provides data for the LoadPath event.

Allows an application to filter the files and folders loaded by the and components and to set the icon, creation date and modified date. To skip a file or folder, set e.Cancel = true. To set a file's icon, or date, set the , or properties.

FileDialogLoadPathEventHandler

Wisej.Web.FileDialogLoadPathEventHandler

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Represents the method that will handle the and events.

IWisejSerializable
String

Allows an object to serialize itself.

folderDialog

FolderBrowserDialog

IBindableComponent

Bindable components implement this interface.

IContainerControl

Provides the functionality for a control to act as a parent for other controls.

IWisejComponent

All wisej components implement this interface.

IWisejControl

All wisej controls derived from the Control class must implement this interface.

IWisejWindow

All wisej top-level windows implement this interface.

ContainerControl
Form
FolderBrowserDialogUI
Public Class FolderBrowserDialogUI
    Inherits Form
public class FolderBrowserDialogUI : Form

.
public class FolderBrowserDialog : CommonDialog
Public Class FolderBrowserDialog
    Inherits CommonDialog

Constructors

FolderBrowserDialog()

Initializes a new instance of FolderBrowserDialog.

FolderBrowserDialog(roots)

Initializes a new instance of FolderBrowserDialog using the initial roots .

Name
Type
Description

roots

Initial file systems to load in the .

FolderBrowserDialog(container)

Initializes a new instance of the FolderBrowserDialog extender with a specified container.

Name
Type
Description

container

An that represents the container of the component.

Properties

Description

String: Returns or sets the description splayed above the tree view control in the dialog box.

Roots

FileDialogRootCollection: List of root IFileSystemProvider file systems displayed by the FolderBrowserDialog.

The Roots collection and the IFileSystemProvider implementations allow the application to use arbitrary names mapped to a specific path. For example, the app may add a root object named "Documents" to "c:\users[logged-user-id]\files\documents". Each user will see "Documents" as the root, but will also see only the files in the [logged-user-id] directory.

SelectedPath

String: Returns sets the path selected by the user.

ShowHelp

Boolean: Returns or sets whether the Help button is displayed in the file dialog box.

Title

String: Returns or sets the file dialog box title.

Methods

GetRoot(path)

Returns the IFileSystemProvider that contains the specified path .

Parameter
Type
Description

path

Full path of the file to locate in on of the .

Returns: IFileSystemProvider. The IFileSystemProvider that contains the specified path or null if not found.

MapPath(folderPath)

Maps the virtual path to the corresponding physical path on the specific IFileSystemProvider implementation.

Parameter
Type
Description

folderPath

Virtual path to map to the corresponding physical path.

Returns: String. The physical path for the IFileSystemProvider implementation.

Reset()

Resets all properties to their default values.

Events

LoadPath

FileDialogLoadPathEventHandler Fired when the file dialog is loading a file or folder.

CommonDialog
FolderBrowserDialog
Roots
Constructors

FileDialogLoadPathEventArgs(path, isDirectory)

Constructs a new instance of FileDialogLoadPathEventArgs.

Name
Type
Description

path

Path of the file or directory.

isDirectory

Indicates that the path is for a directory.

Properties

CreationTime

DateTime: Sets the creation DateTime of the file.

FileSize

Int64: Sets the file size in bytes.

ImageSource

String: Sets the name or path of the icon to display next to the file.

IsDirectory

Boolean: Returns true when the Path refers to a directory.

LastWriteTime

DateTime: Sets the last modified DateTime of the file.

Path

String: Returns the full path of the file or folder being loaded.

Used By

Name
Description

Represents the method that will handle the and events.

Public Class FileDialogLoadPathEventArgs
    Inherits CancelEventArgs
FileDialog
FolderBrowserDialog
ImageSource
CreationTime
LastWriteTime
public class FileDialogLoadPathEventArgs : CancelEventArgs
Parameters
Name
Type
Description

sender

The source of the event.

e

A that contains the event data.

Fired By

Name
Description

Fired when the file dialog is loading a file or folder.

Fired when the file dialog is loading a file or folder.

LoadPath
LoadPath
Public Delegate Sub FileDialogLoadPathEventHandler(ByVal sender As [Object], ByVal e As FileDialogLoadPathEventArgs)
public delegate void FileDialogLoadPathEventHandler(Object sender, FileDialogLoadPathEventArgs e)

OpenFileDialog

Wisej.Web.OpenFileDialog

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

  • CommonDialog

    • FileDialog

Prompts the user to open a file from the server.

You can:

  • Override . It's called when the specified file doesn't exist and the property is true.

  • Override to create your custom when the method is called.

  • Set the to a class that has a constructor that accepts as the single argument to change the User Interface (UI) of the file dialog.

You must add at least one to the collection before showing the dialog.

Constructors

OpenFileDialog()

Initializes a new instance of .

OpenFileDialog(container)

Initializes a new instance of the extender with a specified container.

Name
Type
Description

Properties

CheckFileExists

: Returns or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.

Multiselect

: Returns or sets a value indicating whether the dialog box allows multiple files to be selected.

SafeFileName

: Returns the file name and extension for the file selected in the dialog box. The file name does not include the path.

SafeFileNames

: Returns an array of file names and extensions for all the selected files in the dialog box. The file names do not include the path.

Methods

OpenFile()

Opens the file selected by the user, with read-only permission. The file is specified by the property.

Returns: . A that specifies the read-only file selected by the user.

Throws:

  • is empty or null.

Reset()

Resets all properties to their default values.

IWisejSerializable
Object
FileDialogLoadPathEventArgs
FileDialogLoadPathEventArgs
FileDialog.LoadPath
FolderBrowserDialog.LoadPath
IFileSystemProvider[]
FolderBrowserDialog
IContainer
IContainer
FolderBrowserDialog
String
Roots
String
String
Boolean
FileDialogLoadPathEventHandler
LoadPath
LoadPath

Override OnFileOk to provide your custom implementation of the actions to execute when the user presses the OK button.

container

IContainer

An IContainer that represents the container of the OpenFileDialog component.

OpenFileDialog
Public Class OpenFileDialog
    Inherits FileDialog
PromptFileNotFound
CheckFileExists
CreateUI
Form
ShowDialog
DialogTemplate
Form
FileDialog
IFileSystemProvider
Roots
OpenFileDialog
OpenFileDialog
Boolean
Boolean
String
String[]
FileName
Stream
Stream
ArgumentNullException
FileName
public class OpenFileDialog : FileDialog

SaveFileDialog

Wisej.Web.SaveFileDialog

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

  • CommonDialog

    • FileDialog

Prompts the user to select a location for saving a file on the server.

You can:

  • Override . It's called when the specified file doesn't exist and the property is true.

  • Override . It's called when the specified file doesn't exist and the property is true.

  • Override . It's called when the specified file doesn't exist and the property is true.

You must add at least one to the collection before showing the dialog.

Constructors

SaveFileDialog()

Initializes a new instance of .

SaveFileDialog(container)

Initializes a new instance of the extender with a specified container.

Name
Type
Description

Properties

CreatePrompt

: 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.

OverwritePrompt

: Returns or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that already exists.

Methods

OpenFile()

Opens the file with read/write permission selected by the user.

Returns: . A that specifies the read/write file selected by the user.

Throws:

  • is empty or null.

ProcessFileNames(fileNames)

Receives the file names selected by the user and validates them according to the properties set in the instance.

Parameter
Type
Description

Returns: . True if the files have been validated and the dialog can close; otherwise false to keep the dialog open.

Reset()

Resets all dialog box options to their default values.

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.

  • container

    IContainer

    An IContainer that represents the container of the SaveFileDialog component.

    fileNames

    String[]

    Array containing the selected file paths.

    SaveFileDialog
    Public Class SaveFileDialog
        Inherits FileDialog
    PromptFileNotFound
    CheckFileExists
    PromptFileCreate
    CreatePrompt
    PromptFileOverwrite
    OverwritePrompt
    IFileSystemProvider
    Roots
    SaveFileDialog
    SaveFileDialog
    Boolean
    Boolean
    Stream
    Stream
    ArgumentNullException
    FileName
    FileDialog
    Boolean
    public class SaveFileDialog : FileDialog

    CommonDialog

    Wisej.Web.CommonDialog

    Namespace: Wisej.Web

    Assembly: Wisej.Framework (3.0.0.0)

    Specifies the base class used for displaying dialog boxes on the screen.

    public class CommonDialog : Component
    Public Class CommonDialog
        Inherits Component

    Constructors

    CommonDialog()

    Initializes a new instance of .

    CommonDialog(container)

    Initializes a new instance of the extender with a specified container.

    Name
    Type
    Description

    Properties

    DialogTemplate

    : Returns or sets the type of the common dialog UI control to show when calling the method.

    Tag

    : Returns or sets an object that contains data about the control.

    Title

    : Returns or sets the dialog box title.

    WindowState

    : Returns or sets the initial of the common dialog.

    Methods

    Reset()

    When overridden in a derived class, resets the properties of a common dialog box to their default values.

    ShowDialog()

    Runs a common dialog box with a default owner.

    Returns: . if the user clicks OK in the dialog box; otherwise, .

    ShowDialog(onclose)

    Runs a common dialog box with a default owner.

    Parameter
    Type
    Description

    Returns: . if the user clicks OK in the dialog box; otherwise, .

    ShowDialog(owner)

    Runs a common dialog box with the specified owner.

    Parameter
    Type
    Description

    Returns: . if the user clicks OK in the dialog box; otherwise, .

    ShowDialog(owner, onclose)

    Runs a common dialog box with the specified owner.

    Parameter
    Type
    Description

    Returns: . if the user clicks OK in the dialog box; otherwise, .

    ShowDialogAsync(owner)

    Runs a common dialog box with the specified owner asynchronously.

    Parameter
    Type
    Description

    Returns: . if the user clicks OK in the dialog box; otherwise, .

    Events

    HelpRequested

    Fired when the user clicks the Help button on a common dialog box.

    Inherited By

    Name
    Description

    container

    IContainer

    An IContainer that represents the container of the CommonDialog component.

    onclose

    Action<DialogResult>

    Optional async handler for the close event; called when the form/dialog has been closed. It's the equivalent of handling the event. When the onclose event handler is specified, the modal dialog doesn't suspend the execution on the server but it's still shown as a modal dialog on the client.

    owner

    Form

    A Form that represents the top-level window that owns the modal dialog box. It can be null.

    owner

    Form

    A Form that represents the top-level window that owns the modal dialog box. It can be null.

    onclose

    Action<DialogResult>

    Optional async handler for the close event; called when the form/dialog has been closed. It's the equivalent of handling the event. When the onclose event handler is specified, the modal dialog doesn't suspend the execution on the server but it's still shown as a modal dialog on the client.

    owner

    Form

    A Form that represents the top-level window that owns the modal dialog box. It can be null.

    ColorDialog

    Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors.

    FileDialog

    Displays a dialog box from which the user can select a file.

    FolderBrowserDialog

    Allows the user to select a folder from one of the Roots.

    OpenFileDialog

    Prompts the user to open a file from the server.

    SaveFileDialog

    Prompts the user to select a location for saving a file on the server.

    CommonDialog
    CommonDialog
    Type
    ShowDialog
    Object
    String
    FormWindowState
    WindowState
    DialogResult
    OK
    Cancel
    DialogResult
    OK
    Cancel
    DialogResult
    OK
    Cancel
    DialogResult
    OK
    Cancel
    Task<DialogResult>
    OK
    Cancel
    EventHandler

    FileDialog

    Wisej.Web.FileDialog

    Namespace: Wisej.Web

    Assembly: Wisej.Framework (3.0.0.0)

    • CommonDialog

      • FileDialog

    Displays a dialog box from which the user can select a file.

    This class is abstract. The current implementations in Wisej are and . You can override this class or and to add your own custom behavior and localization. You can:

    • Override . It's called when the specified file doesn't exist and the property is true.

    • Override to create your custom when the method is called.

    • Set the to a class that has a constructor that accepts as the single argument to change the User Interface (UI) of the file dialog.

    You must add at least one to the collection before showing the dialog.

    Constructors

    FileDialog()

    Initializes a new instance of .

    FileDialog(roots)

    Initializes a new instance of using the initial roots .

    Name
    Type
    Description

    FileDialog(container)

    Initializes a new instance of the extender with a specified container.

    Name
    Type
    Description

    Properties

    AddExtension

    : Returns or sets whether the dialog box automatically adds an extension to a file name if the user omits the extension.

    CheckFileExists

    : Returns or sets whether the dialog box displays a warning if the user specifies a file name that does not exist.

    DefaultExtension

    : Returns or sets the default file name extension.

    FileName

    : Returns or sets a string containing the file name selected in the file dialog box.

    FileNames

    : Returns the file names of all selected files in the dialog box.

    FileSystem

    : Returns the that contains the selected .

    Filter

    : Returns or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

    FilterIndex

    : Returns or sets the index of the filter currently selected in the file dialog box.

    InitialDirectory

    : Returns or sets the initial directory displayed by the file dialog box.

    Roots

    : List of root file systems displayed by the FileDialog.

    The Roots collection and the implementations allow the application to use arbitrary names mapped to a specific path. For example, the app may add a root object named "Documents" to "c:\users[logged-user-id]\files\documents". Each user will see "Documents" as the root, but will also see only the files in the [logged-user-id] directory.

    ShowHelp

    : Returns or sets whether the Help button is displayed in the file dialog box.

    Title

    : Returns or sets the file dialog box title.

    Methods

    GetRoot(path)

    Returns the that contains the specified path .

    Parameter
    Type
    Description

    Returns: . The that contains the specified path or null if not found.

    MapPath(filePath)

    Maps the virtual path to the corresponding physical path on the specific implementation.

    Parameter
    Type
    Description

    Returns: . The physical path for the implementation.

    ProcessFileNames(fileNames)

    Receives the file names selected by the user and validates them according to the properties set in the instance.

    Parameter
    Type
    Description

    Returns: . True if the files have been validated and the dialog can close; otherwise false to keep the dialog open.

    Reset()

    Resets all properties to their default values.

    Events

    FileOk

    Fired when the user clicks on the Open or Save button on a file dialog box.

    LoadPath

    Fired when the file dialog is loading a file or folder.

    Inherited By

    Name
    Description

    Override OnFileOk to provide your custom implementation of the actions to execute when the user presses the OK button.

    roots

    IFileSystemProvider[]

    Initial file systems to load in the FolderBrowserDialog.

    container

    IContainer

    An IContainer that represents the container of the FileDialog component.

    path

    String

    Full path of the file to locate in on of the Roots.

    filePath

    String

    Virtual path to map to the corresponding physical path.

    fileNames

    String[]

    Array containing the selected file paths.

    OpenFileDialog

    Prompts the user to open a file from the server.

    SaveFileDialog

    Prompts the user to select a location for saving a file on the server.

    Public Class FileDialog
        Inherits CommonDialog
    OpenFileDialog
    SaveFileDialog
    OpenFileDialog
    SaveFileDialog
    PromptFileNotFound
    CheckFileExists
    CreateUI
    Form
    ShowDialog
    DialogTemplate
    Form
    FileDialog
    FileSystemProvider
    Roots
    FileDialog
    FileDialog
    FileDialog
    Boolean
    Boolean
    String
    String
    String[]
    IFileSystemProvider
    IFileSystemProvider
    FileName
    String
    Int32
    String
    FileDialogRootCollection
    IFileSystemProvider
    IFileSystemProvider
    Boolean
    String
    IFileSystemProvider
    IFileSystemProvider
    IFileSystemProvider
    IFileSystemProvider
    String
    IFileSystemProvider
    FileDialog
    Boolean
    CancelEventHandler
    FileDialogLoadPathEventHandler
    public class FileDialog : CommonDialog