IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Public Member Functions | |
DirectorySelector () | |
string | GetFilePathRepresentation (string directoryPath) |
Returns the presentational form of the specified directory path, with eventual environment variables expanded and with conversion to the appropriate form (relative or absolute). More... | |
void | BrowseDirectory () |
Browses for the file to be hashed. More... | |
void | ClearHistory () |
Protected Member Functions | |
virtual void | UpdateErrorState () |
Updates controls according to error state. More... | |
virtual void | OnDirectorySelected () |
Called whenever the selected directory changes. More... | |
virtual void | OnDirectoryChanged () |
Called whenever the directory containing the selected file changes. More... | |
void | Handle_CtrlA_CtrlBackspace (TextBox textBox, object sender, KeyEventArgs e) |
Handle the Ctrl-A (select all) and Ctrl-Backspace events for the specified text box. More... | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Protected Attributes | |
string | _containingDirectoryPath |
string | _directoryPath |
Properties | |
bool | FileTextBoxInitialized [get, set] |
string | InitialDirectoryPath [get, protected set] |
Directory where files are currently selected. More... | |
bool | AllowEnvironmentVariables [get, set] |
If true then environment variables can be used in paths. More... | |
bool | AllowExistentDirectories [get, set] |
If true then existent files are allowed to be selected. More... | |
bool | AllowNonexistentDirectories [get, set] |
If true then non-existend files are allowed to be selected. More... | |
bool | UseRelativePaths [get, set] |
If true then relative paths are used in representation of the selseted file path. More... | |
bool | UseAbsolutePaths [get, set] |
If true then absolute paths are used in representation of the selseted file path. More... | |
bool | UseFileDialog [get, set] |
If true then an OpenFileDialog is used to browse for directory, rather than Directorydialog bool UseFileDialog More... | |
string | DirectoryPath [get, set] |
Path to the file that is currently selected. More... | |
string | OriginalDirectoryPath [get, set] |
Gets the original file path representation (as set by user), without any post processing (like environment variables expansion or conversion to relative or absolute path). More... | |
virtual bool | IsErrorState [get] |
Returns true if the current selection is invalid, false if it is valid. More... | |
virtual Color | ErrorBackground [get, set] |
Background color of selection's text in case of error. More... | |
virtual Color | ErrorForeground [get, set] |
Foreground color of button in case of error. More... | |
virtual Color | NormalBackground [get, set] |
Background color of selection's text in case of NO error. More... | |
virtual Color | NormalForeground [get, set] |
Foreground color of button in case of NO error. More... | |
bool | IsBrowsable [get, set] |
Gets or sets the flag specifying whether one can browse for the file to be opened (e.g. by using the file selection dialog). More... | |
bool | IsDragAndDrop [get, set] |
Whether the selector provides drag & drop capability. More... | |
Events | |
EventHandler | DirectorySelected |
Event that is fired whenever the selected directory changes. More... | |
EventHandler | DirectoryChanged |
Event that is fired whenever directory containing the selected file changes. More... | |
Private Member Functions | |
void | btnFileBrowse_Click (object sender, EventArgs e) |
Browses for the file whose hashRet values will be calculated. More... | |
void | txtFile_Click (object sender, EventArgs e) |
void | comboBoxFile_SelectedIndexChanged (object sender, EventArgs e) |
void | comboBoxFile_Enter (object sender, EventArgs e) |
void | comboBoxFile_Validated (object sender, EventArgs e) |
void | comboBoxFile_KeyUp (object sender, KeyEventArgs e) |
void | comboBoxFile_MouseEnter (object sender, EventArgs e) |
void | comboBoxFile_TextChanged (object sender, EventArgs e) |
void | FileSelector_DragEnter (object sender, DragEventArgs e) |
void | FileSelector_DragDrop (object sender, DragEventArgs e) |
void | menuClearHistory_Click (object sender, EventArgs e) |
void | menuAllowNonexistent_CheckedChanged (object sender, EventArgs e) |
void | menuAllowExistent_CheckedChanged (object sender, EventArgs e) |
void | menuExpandEnvironment_CheckedChanged (object sender, EventArgs e) |
void | menuAbsolutePaths_CheckedChanged (object sender, EventArgs e) |
void | menuRelativePaths_CheckedChanged (object sender, EventArgs e) |
void | menuPathRepresentation_Click (object sender, EventArgs e) |
void | menuInputTextBox_Click (object sender, EventArgs e) |
void | menuInputTextBox_Validated (object sender, EventArgs e) |
void | menuInputTextBox_KeyUp (object sender, KeyEventArgs e) |
void | menuAllowNonexistent_Click (object sender, EventArgs e) |
Reopens the context menu at its previous position. More... | |
void | menuAllowExistent_Click (object sender, EventArgs e) |
Reopens the context menu at its previous position. More... | |
void | menuExpandEnvironment_Click (object sender, EventArgs e) |
Reopens the context menu at its previous position. More... | |
void | menuUseFileDialog_Click (object sender, EventArgs e) |
void | menuUseFileDialog_CheckedChanged (object sender, EventArgs e) |
void | menuAbsolutePaths_Click (object sender, EventArgs e) |
Reopens the context menu at its previous position. More... | |
void | menuRelativePaths_Click (object sender, EventArgs e) |
Reopens the context menu at its previous position. More... | |
void | contextMenuMain_Opened (object sender, EventArgs e) |
Stores the position where the menu item has last opened. More... | |
void | InitializeComponent () |
Required method for Designer support - do not modify the contents of this method with the code editor. More... | |
Private Attributes | |
bool | _fileTextBoxInitialized = false |
bool | _allowEnvironmentVariables = true |
bool | _allowExistentDirectories = true |
bool | _allowNonexistentDirectories = true |
bool | _useRelativePaths = false |
bool | _useAbsolutePaths = false |
bool | _useFileDialog = true |
Color | _errorBackground = Color.Orange |
Color | _errorForeground = Color.Red |
Color | _normalBackground = Color.White |
Color | _normalforeground = Color.Black |
bool | _isBrowsable = true |
bool | _isDragAndDrop = true |
bool | _skipFileValidationEvent = false |
Point | _lasContectMenuPosition = new Point(0, 0) |
System.ComponentModel.IContainer | components = null |
Required designer variable. More... | |
System.Windows.Forms.Button | btnFileBrowse |
System.Windows.Forms.Label | lblFile |
System.Windows.Forms.FolderBrowserDialog | openDirectoryDialog1 |
System.Windows.Forms.ComboBox | comboBoxFile |
System.Windows.Forms.ContextMenuStrip | contextMenuMain |
System.Windows.Forms.ToolStripMenuItem | menuClearHistory |
System.Windows.Forms.ToolStripMenuItem | menuAllowNonexistent |
System.Windows.Forms.ToolStripMenuItem | menuAllowExistent |
System.Windows.Forms.ToolStripMenuItem | menuExpandEnvironment |
System.Windows.Forms.ToolStripMenuItem | menuAbsolutePaths |
System.Windows.Forms.ToolStripMenuItem | menuRelativePaths |
System.Windows.Forms.ToolStripMenuItem | menuShowPath |
System.Windows.Forms.ToolStripMenuItem | menuPathRepresentation |
System.Windows.Forms.ToolStripMenuItem | menuInputPath |
System.Windows.Forms.ToolStripTextBox | menuInputTextBox |
System.Windows.Forms.ToolStripMenuItem | menuUseFileDialog |
System.Windows.Forms.OpenFileDialog | openFileDialog1 |
|
inline |
|
inline |
Returns the presentational form of the specified directory path, with eventual environment variables expanded and with conversion to the appropriate form (relative or absolute).
directoryPath | Directory path whose presentational form is returned. |
Presentational form depends on the following properties: <pra> - AllowEnvironmentVariables: If true then environment variable references are expanded.
In Unix-like systems, enviironment variables are referenced as $varName, and on Windows with varName%.
</pra>
- UseAbsolutePaths: If true then paths are presented as absolute paths (independend of the current working directory).
- UseRelativePaths: If true then paths are represented relative to the current working directory.
References IG.Lib.UtilSystem.GetAbsolutePath(), and IG.Lib.UtilSystem.GetRelativePath().
|
inlineprotectedvirtual |
Updates controls according to error state.
|
inline |
Browses for the file to be hashed.
|
inline |
|
inlineprotectedvirtual |
Called whenever the selected directory changes.
|
inlineprotectedvirtual |
Called whenever the directory containing the selected file changes.
|
inlineprivate |
Browses for the file whose hashRet values will be calculated.
|
inlineprotected |
Handle the Ctrl-A (select all) and Ctrl-Backspace events for the specified text box.
textBox | Text box for wich the event is handled. |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Reopens the context menu at its previous position.
|
inlineprivate |
Reopens the context menu at its previous position.
|
inlineprivate |
Reopens the context menu at its previous position.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Reopens the context menu at its previous position.
|
inlineprivate |
Reopens the context menu at its previous position.
|
inlineprivate |
Stores the position where the menu item has last opened.
|
inlineprotected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
|
inlineprivate |
Required method for Designer support - do not modify the contents of this method with the code editor.
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Required designer variable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getsetprotected |
|
getprotected set |
Directory where files are currently selected.
|
getset |
If true then environment variables can be used in paths.
|
getset |
If true then existent files are allowed to be selected.
It might be impossible to insert such a path through the file dialog (launched by the "Browse" button), but one can insert it in the text box.
|
getset |
If true then non-existend files are allowed to be selected.
It might be impossible to insert such a path through the file dialog (launched by the "Browse" button), but one can insert it in the text box.
|
getset |
If true then relative paths are used in representation of the selseted file path.
This property is mutually exclusive with UseAbsolutePaths (only one can be true, but both can be false).
|
getset |
If true then absolute paths are used in representation of the selseted file path.
This property is mutually exclusive with UseRelativePaths (only one can be true, but both can be false).
|
getsetprivate |
If true then an OpenFileDialog is used to browse for directory, rather than Directorydialog bool UseFileDialog
|
getset |
Path to the file that is currently selected.
Getter returns the output representation of the path, with eventual environment variables expansion (dependent on AllowEnvironmentVariables properties) and in appropriate form (relative or absolute path, according to UseRelativePaths and UseAbsolutePaths properties).
Original path ca be retrieved by the OriginalDirectoryPath property.
|
getset |
Gets the original file path representation (as set by user), without any post processing (like environment variables expansion or conversion to relative or absolute path).
Setter just calls the setter of the DirectoryPath property.
|
get |
Returns true if the current selection is invalid, false if it is valid.
In the case of invalid selection, OriginalDirectoryPath may return a non-null path but DirectoryPath does not.
|
getset |
Background color of selection's text in case of error.
|
getset |
Foreground color of button in case of error.
|
getset |
Background color of selection's text in case of NO error.
|
getset |
Foreground color of button in case of NO error.
|
getset |
Gets or sets the flag specifying whether one can browse for the file to be opened (e.g. by using the file selection dialog).
If the viewer does not at all have browser capability then setting to true should NOT throw an exception (therefore, the user should verify by getter if setting actually worked).
Setter can be used to disable browsing (e.g. for security, or when used as embedded control and browsing would be disturbing).
|
getset |
Whether the selector provides drag & drop capability.
Setter can be used to disable drag & drop (e.g. for security, or when used with an embedded control and drag & drop would be disturbing).
EventHandler IG.Forms.DirectorySelector.DirectorySelected |
Event that is fired whenever the selected directory changes.
EventHandler IG.Forms.DirectorySelector.DirectoryChanged |
Event that is fired whenever directory containing the selected file changes.