| IGLib 1.7.2 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Events | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IG.Forms.ResourceSelector Class Reference
Inheritance diagram for IG.Forms.ResourceSelector:
[legend]
Collaboration diagram for IG.Forms.ResourceSelector:
[legend]

## Public Member Functions
| ResourceSelector ()
void | RefreshSelectableAssembliesList ()
| Refreshes the list of assemblies from which one can select resources. More...
void | RefreshResourcesLists ()
| Refreshes all internal lists of resources eligible for selection. More...
string[] | GetEmbeddedResourcesArray ()
| Returns an array of all selectable embedded resources (compiled into assemblies as embedded files). More...
IList< string > | GetEmbeddedResources (IList< string > resourceList=null, bool clearBefore=true)
| Stores to the specified list all embedded resources (i.e. resources that were compiled into assemblies as embedded files) eligible for selection, and returns the list. More...
string[] | GetResxResourcesArray ()
| Returns an array of all selectable resx resources (those included through .resx files and compiled into .resources files). More...
IList< string > | GetResxResources (IList< string > resourceList=null, bool clearBefore=true)
| Stores to the specified list all resx resources (i.e. resources that were included through .resx files and compiled into assemblies' .resources files) eligible for selection, and returns the list. More...
IList< string > | GetSelectableResources (IList< string > resourceList=null, bool clearBefore=true)
| Stores allresources eligible to be selected in the current selector control (according to its state) to the specified list, and returns the list. More...

## Protected Member Functions
AssemblySelector | GetAssemblySeclector ()
| Returns reference to assembly selector. More...
void | RefreshSelectableResourcesList ()
| Refreshes the list of all selectable resources, and also updates the combo box where resources are selected and triggers the SelectionParametersChanged event. More...
void | RefreshEmbeddedResourcesList (bool suppressRefreshSelectable=false)
| Re-creates (refreshes) the list of selectable embedded resources. More...
void | RefreshResxResourcesList (bool suppressRefreshSelectable=false)
| Re-creates (refreshes) the list of selectable resources that were included into the assembly through resource file(s) (.resx files compiled into assemblies as .resources files). More...
virtual void | OnResourceSelected ()
| Called whenever the selected resource changes. More...
virtual void | OnSelectionParametersChanged ()
| Must be called whenever the selection parameters change. More...
override void | Dispose (bool disposing)
| Clean up any resources being used. More...

## Protected Attributes
List< string > | _auxResList = new List<string>()
| Serves internally as auxiliary list to temporarily store acquired data before further processing. More...

## Properties
bool | SelectFromAssemblyFiles`[get, set]`
| Whether resources can be seleted from assembly files. Delegated to assembly selector (property AssemblySelector.SelectFromFiles). More...
bool | SelectFromLoadedAssemblies`[get, set]`
| Whether resources can be seleted from loaded assemblies. Delegated to assembly selector. More...
bool | SelectFromReferencedAssemblies`[get, set]`
| Whether resources can be seleted from referenced assemblies. Delegated to assembly selector. More...
static string | InitialTextComboResources`[get]`
| Initial text written on the combo box for resource selection. More...
static string | InitialTextLabelFullName`[get]`
| Initial text written on the label that shows the long name of the resource. More...
string | SelectedResource`[get, private set]`
bool | MultipleAssembliesAllowed`[get, set]`
| Ehether mulltiple assemblies are allowed. More...
bool | SelectFromEmbeddedResources`[get, set]`
| Indicates whether embedded resources (compoiled as files) are included in listing. More...
bool | IncludeResourceFiles`[get, set]`
| Indicates whether resource files (generated from .resx files and compiled into .resources files in assemblies) are listed as embedded resources. More...
bool | SelectFromResxResources`[get, set]`
| Indicates whether resources that are bundled in resource files are included in listing. More...
List< Assembly > | SelectableAssemblies`[get]`
List< string > | EmbeddedResourcesList`[get]`
| List of all embedded resources one can select from. More...
List< string > | ResxResourcesList`[get]`
| List of all resx-based resources one can select from. More...
List< string > | SelectableResourcesList`[get]`
| List of all referenced assemblies. More...

## Events
EventHandler | ResourceSelected
| Event that is fired whenever the selected resource changes. More...
EventHandler | SelectionParametersChanged
| Event that is fired whenever the selection parameters change (e.g., whether resources can be selected from multiple assemblies, or from the set of loaded assemblies, or from the set of assemblies referenced by the current assembly, and if the king of resources changes). More...

## Private Member Functions
void | chkMultipleAssemblies_CheckedChanged (object sender, EventArgs e)
void | chkEmbedded_CheckedChanged (object sender, EventArgs e)
void | chkIncludeResxFiles_CheckedChanged (object sender, EventArgs e)
void | chkResx_CheckedChanged (object sender, EventArgs e)
void | comboResources_SelectedIndexChanged (object sender, EventArgs e)
void | assemblySelector1_AssemblySelected (object sender, EventArgs e)
void | assemblySelector1_SelectionParametersChanged (object sender, EventArgs e)
void | comboResources_Click (object sender, EventArgs e)
void | InitializeComponent ()
| Required method for Designer support - do not modify the contents of this method with the code editor. More...

## Private Attributes
string | _selectedResource = null
bool | _multipleAssembliesAllowed = false
bool | _selectFromEmbeddedResources = true
bool | _includeResourceFiles = true
bool | _selectFromResxResources = true
List< Assembly > | _selectableAssemblies = new List<Assembly>()
List< string > | _embeddedResourcesList = new List<string>()
List< string > | _resxResourcesList = new List<string>()
List< string > | _selectableResourcesList = new List<string>()
System.ComponentModel.IContainer | components = null
| Required designer variable. More...
AssemblySelector | assemblySelector1
System.Windows.Forms.Label | lblResources
System.Windows.Forms.CheckBox | chkMultipleAssemblies
System.Windows.Forms.CheckBox | chkEmbedded
System.Windows.Forms.CheckBox | chkResx
System.Windows.Forms.ComboBox | comboResources
System.Windows.Forms.Label | lblSelectedResource
System.Windows.Forms.CheckBox | chkIncludeResxFiles

## Static Private Attributes
static string | _initialTextComboShortName = "<< Select a resource! >>"
static string | _initialTextLabelFullName = "<< Resource is not selected. >>"

## Constructor & Destructor Documentation

IG.Forms.ResourceSelector.ResourceSelector | ( |  | ) |
| inline

## Member Function Documentation

AssemblySelector IG.Forms.ResourceSelector.GetAssemblySeclector | ( |  | ) |
| inline protected

Returns reference to assembly selector.

void IG.Forms.ResourceSelector.RefreshSelectableAssembliesList | ( |  | ) |
| inline

Refreshes the list of assemblies from which one can select resources.

void IG.Forms.ResourceSelector.RefreshResourcesLists | ( |  | ) |
| inline

Refreshes all internal lists of resources eligible for selection.

This will also handle all dependencies and raise the appropriate events.

This method is made public in order to enable users invoke refreshes just for any case, although in most scenarios this will not be necessary (one case this might be usable is where external circumstances change, e.g. assemblies get loaded or unloaded).

void IG.Forms.ResourceSelector.RefreshSelectableResourcesList | ( |  | ) |
| inline protected

Refreshes the list of all selectable resources, and also updates the combo box where resources are selected and triggers the SelectionParametersChanged event.

The currently selected resource is updated if necessary (i.e., set to null if the new list of selectable resources does not contain it any more), and the appropriate event is triggered (i.e., the SelectionParametersChanged by call to OnSelectionParametersChanged).

void IG.Forms.ResourceSelector.RefreshEmbeddedResourcesList | ( | bool | suppressRefreshSelectable = `false` | ) |
| inline protected

Re-creates (refreshes) the list of selectable embedded resources.

Parameters

  suppressRefreshSelectable | If true then the method does not refresh the list of all selectable resources (performed by the RefreshSelectableResourcesList method) - see method desctiption for what it does beside refreshing of the list. This is useful when this method is called in connection with another partial refresh method, sinnce common list can be refreshed only once after all of these methods are called.

References IG.Lib.UtilSystem.AssemblySeparator, IG.Lib.UtilSystem.GetAssemblyEmbeddedFileResources(), and IG.Lib.UtilSystem.GetAssemblyName().

void IG.Forms.ResourceSelector.RefreshResxResourcesList | ( | bool | suppressRefreshSelectable = `false` | ) |
| inline protected

Re-creates (refreshes) the list of selectable resources that were included into the assembly through resource file(s) (.resx files compiled into assemblies as .resources files).

Parameters

  suppressRefreshSelectable | If true then the method does not refresh the list of all selectable resources (performed by the RefreshSelectableResourcesList method) - see method desctiption for what it does beside refreshing of the list. This is useful when this method is called in connection with another partial refresh method, sinnce common list can be refreshed only once after all of these methods are called.

References IG.Lib.UtilSystem.AssemblySeparator, IG.Lib.UtilSystem.GetAssemblyName(), and IG.Lib.UtilSystem.GetAssemblyResxResources().

string [] IG.Forms.ResourceSelector.GetEmbeddedResourcesArray | ( |  | ) |
| inline

Returns an array of all selectable embedded resources (compiled into assemblies as embedded files).

IList<string> IG.Forms.ResourceSelector.GetEmbeddedResources | ( | IList< string > | resourceList = `null`,
|  | bool | clearBefore = `true`
| ) |  |
| inline

Stores to the specified list all embedded resources (i.e. resources that were compiled into assemblies as embedded files) eligible for selection, and returns the list.

The method takes care that resource identifires stored are unique.

Parameters

  resourceList | List where resources are stored.
  clearBefore | Whether the list is cleared at the beginnning of operation.

Returns
  The list where resource identifiers are stored. This enables one to put null list as argument.

string [] IG.Forms.ResourceSelector.GetResxResourcesArray | ( |  | ) |
| inline

Returns an array of all selectable resx resources (those included through .resx files and compiled into .resources files).

IList<string> IG.Forms.ResourceSelector.GetResxResources | ( | IList< string > | resourceList = `null`,
|  | bool | clearBefore = `true`
| ) |  |
| inline

Stores to the specified list all resx resources (i.e. resources that were included through .resx files and compiled into assemblies' .resources files) eligible for selection, and returns the list.

The method takes care that resource identifires stored are unique.

Parameters

  resourceList | List where resources are stored.
  clearBefore | Whether the list is cleared at the beginnning of operation.

Returns
  The list where resource identifiers are stored. This enables one to put null list as argument.

IList<string> IG.Forms.ResourceSelector.GetSelectableResources | ( | IList< string > | resourceList = `null`,
|  | bool | clearBefore = `true`
| ) |  |
| inline

Stores allresources eligible to be selected in the current selector control (according to its state) to the specified list, and returns the list.

The method takes care that resource IDs stored are unique.

If a resource is currently selected then this selected resource is added first.

This takes into account which kinds of resources can be selected.

Parameters

  resourceList | List where resource IDs are stored.
  clearBefore | Whether the list is cleared at the beginnning of operation.

Returns
  The list where assemblies are stored. This enables one to put null list as argument.

virtual void IG.Forms.ResourceSelector.OnResourceSelected | ( |  | ) |
| inline protected virtual

Called whenever the selected resource changes.

virtual void IG.Forms.ResourceSelector.OnSelectionParametersChanged | ( |  | ) |
| inline protected virtual

Must be called whenever the selection parameters change.

void IG.Forms.ResourceSelector.chkMultipleAssemblies_CheckedChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.chkEmbedded_CheckedChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.chkIncludeResxFiles_CheckedChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.chkResx_CheckedChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.comboResources_SelectedIndexChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.assemblySelector1_AssemblySelected | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.assemblySelector1_SelectionParametersChanged | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.ResourceSelector.comboResources_Click | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

override void IG.Forms.ResourceSelector.Dispose | ( | bool | disposing | ) |
| inline protected

Clean up any resources being used.

Parameters

  disposing | true if managed resources should be disposed; otherwise, false.

void IG.Forms.ResourceSelector.InitializeComponent | ( |  | ) |
| inline private

Required method for Designer support - do not modify the contents of this method with the code editor.

## Member Data Documentation

string IG.Forms.ResourceSelector._initialTextComboShortName = "<< Select a resource! >>"
| static private

string IG.Forms.ResourceSelector._initialTextLabelFullName = "<< Resource is not selected. >>"
| static private

string IG.Forms.ResourceSelector._selectedResource = null
| private

bool IG.Forms.ResourceSelector._multipleAssembliesAllowed = false
| private

bool IG.Forms.ResourceSelector._selectFromEmbeddedResources = true
| private

bool IG.Forms.ResourceSelector._includeResourceFiles = true
| private

bool IG.Forms.ResourceSelector._selectFromResxResources = true
| private

List<Assembly> IG.Forms.ResourceSelector._selectableAssemblies = new List<Assembly>()
| private

List<string> IG.Forms.ResourceSelector._embeddedResourcesList = new List<string>()
| private

List<string> IG.Forms.ResourceSelector._resxResourcesList = new List<string>()
| private

List<string> IG.Forms.ResourceSelector._selectableResourcesList = new List<string>()
| private

List<string> IG.Forms.ResourceSelector._auxResList = new List<string>()
| protected

Serves internally as auxiliary list to temporarily store acquired data before further processing.

System.ComponentModel.IContainer IG.Forms.ResourceSelector.components = null
| private

Required designer variable.

AssemblySelector IG.Forms.ResourceSelector.assemblySelector1
| private

System.Windows.Forms.Label IG.Forms.ResourceSelector.lblResources
| private

System.Windows.Forms.CheckBox IG.Forms.ResourceSelector.chkMultipleAssemblies
| private

System.Windows.Forms.CheckBox IG.Forms.ResourceSelector.chkEmbedded
| private

System.Windows.Forms.CheckBox IG.Forms.ResourceSelector.chkResx
| private

System.Windows.Forms.ComboBox IG.Forms.ResourceSelector.comboResources
| private

System.Windows.Forms.Label IG.Forms.ResourceSelector.lblSelectedResource
| private

System.Windows.Forms.CheckBox IG.Forms.ResourceSelector.chkIncludeResxFiles
| private

## Property Documentation

bool IG.Forms.ResourceSelector.SelectFromAssemblyFiles
| get set

Whether resources can be seleted from assembly files. Delegated to assembly selector (property AssemblySelector.SelectFromFiles).

bool IG.Forms.ResourceSelector.SelectFromLoadedAssemblies
| get set

Whether resources can be seleted from loaded assemblies. Delegated to assembly selector.

bool IG.Forms.ResourceSelector.SelectFromReferencedAssemblies
| get set

Whether resources can be seleted from referenced assemblies. Delegated to assembly selector.

string IG.Forms.ResourceSelector.InitialTextComboResources
| static get

Initial text written on the combo box for resource selection.

string IG.Forms.ResourceSelector.InitialTextLabelFullName
| static get

Initial text written on the label that shows the long name of the resource.

string IG.Forms.ResourceSelector.SelectedResource
| get private set

bool IG.Forms.ResourceSelector.MultipleAssembliesAllowed
| get set

Ehether mulltiple assemblies are allowed.

If true then resouces can be selected from all assemblies that are eligible for selection in the assembly sleector (type AssemblySelector)

.

If false then resouces can be selected only from the (single) selected assembly.

.

bool IG.Forms.ResourceSelector.SelectFromEmbeddedResources
| get set

Indicates whether embedded resources (compoiled as files) are included in listing.

bool IG.Forms.ResourceSelector.IncludeResourceFiles
| get set

Indicates whether resource files (generated from .resx files and compiled into .resources files in assemblies) are listed as embedded resources.

If false then only resources included in these files can be selected (provided that the SelectFromResxResources propery is true) as resources, but not their containig files themselves.

bool IG.Forms.ResourceSelector.SelectFromResxResources
| get set

Indicates whether resources that are bundled in resource files are included in listing.

List<Assembly> IG.Forms.ResourceSelector.SelectableAssemblies
| get protected

List<string> IG.Forms.ResourceSelector.EmbeddedResourcesList
| get protected

List of all embedded resources one can select from.

List<string> IG.Forms.ResourceSelector.ResxResourcesList
| get protected

List of all resx-based resources one can select from.

List<string> IG.Forms.ResourceSelector.SelectableResourcesList
| get protected

List of all referenced assemblies.

## Event Documentation

EventHandler IG.Forms.ResourceSelector.ResourceSelected

Event that is fired whenever the selected resource changes.

EventHandler IG.Forms.ResourceSelector.SelectionParametersChanged

Event that is fired whenever the selection parameters change (e.g., whether resources can be selected from multiple assemblies, or from the set of loaded assemblies, or from the set of assemblies referenced by the current assembly, and if the king of resources changes).

The documentation for this class was generated from the following files:

- igforms/Utilities/BasicControls/ResourceSelector.cs
- igforms/Utilities/BasicControls/ResourceSelector.Designer.cs