Click or drag to resize

ImportWithFileNameDerivedPropertiesActionController Class

Controls the user interface for importing files with properties extracted from their names. This controller manages the interaction between the view and the underlying data model, represented by the ImportWithPropertiesOptions class. It provides properties and commands that are bound to the view, allowing users to specify file names, target table names, and manage the property extraction tree.
Inheritance Hierarchy

Namespace: Altaxo.Gui.Serialization.NamePropertyExtraction
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3618.0 (4.8.3618.0)
Syntax
C#
public class ImportWithFileNameDerivedPropertiesActionController : MVCANDControllerEditImmutableDocBase<ImportWithFileNameDerivedPropertiesAction, IImportWithFileNameDerivedPropertiesActionView>

The ImportWithFileNameDerivedPropertiesActionController type exposes the following members.

Constructors
 NameDescription
Public methodImportWithFileNameDerivedPropertiesActionControllerInitializes a new instance of the ImportWithFileNameDerivedPropertiesActionController class
Top
Properties
 NameDescription
Public propertyActionsPutToPropertyBag Gets or sets the collection of actions to be performed on properties during the import process. Each action specifies a property name and the level of the property bag where the property should be put. This collection is bound to the view and allows users to manage the actions that will be applied to properties extracted from file names during the import process.
Public propertyCmdAddActionConditionalTemplate Gets the command to add an action that conditionally copies project items to a target folder based on a specified condition. This command is bound to the view and is triggered when the user initiates the action to add a new conditional action. The command executes the EhCmdAddActionConditionalTemplate method, which handles the logic for adding a new conditional action to the collection of actions that will be applied during the import process.
Public propertyCmdAddActionPutToPropertyBag Gets the command to add an action to put a property into the property bag. This command is bound to the view and is triggered when the user initiates the action to add a new property action. The command executes the EhCmdAddActionPutToPropertyBag method, which handles the logic for adding a new action to the collection of actions that will be applied during the import process.
Public propertyCmdAddFiles Gets the command to add files for import. This command is bound to the view and is triggered when the user initiates the action to add files. The command executes the EhCmdAddFiles method, which handles the logic for adding files to the import process.
Public propertyCmdDeleteAction Gets the command to delete the selected action from the collection of actions that will be applied during the import process. This command is bound to the view and is triggered when the user initiates the action to delete an existing action. The command executes the EhCmdDeleteAction method, which handles the logic for removing the selected action from the collection.
Public propertyCmdEditAction Gets the command to edit the selected action in the collection of actions that will be applied during the import process. This command is bound to the view and is triggered when the user initiates the action to edit an existing action. The command executes the EhCmdEditAction method, which handles the logic for editing the selected action and updating its properties based on user input.
Public propertyCmdRescanFileSystem Gets the command to rescan the file system. This command is bound to the view and is triggered when the user initiates the action to rescan the file system. The command executes the EhCmdRescanFileSystem method, which handles the logic for rescanning the file system.
Public propertyFileNamePatternsExcluded Gets or sets the file names to be excluded from the import process.
Public propertyFileNamePatternsIncluded Gets or sets the file names to be imported. This property is bound to the view and is used to specify the files that will be processed for property extraction and import into the target table.
Public propertyFolderOrTableNameUsedAsTemplateIfTargetTableIsMissing Gets or sets the name of a folder or atable that is used as a template if the target table does not exist. In this case, if the string represents a folder, the contents of the folder is copied to the folder of the target table, or, if the string represents a table, the table is copied to the target table before importing the files.
Public propertyIsDisposed Gets a value indicating whether this controller is already disposed.
(Inherited from ControllerBase)
Public propertyModelObject Gets the model (document) that this controller manages.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected propertyNoDocumentException Gets an exception that is thrown when a controller was not initialized with a document.
(Inherited from ControllerBase)
Protected propertyNotInitializedException Gets an exception that is thrown when a controller is not properly initialized.
(Inherited from ControllerBase)
Protected propertyNoViewException Gets an exception that is thrown when a controller currently has no view.
(Inherited from ControllerBase)
Public propertyOverwriteProjectItems Gets or sets the overwrite behavior for copying project items.
Public propertyPropertyNames Gets or sets the list of property names that are extracted from the file names during the import process. This property is bound to the view and is updated whenever the property extraction tree changes, reflecting the current set of properties that will be used in the import process.
Public propertyProvisionalModelObject Gets the provisional model object. This is the model object that is based on the current user input.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Public propertyRowsOfPropertyBagPreview Gets or sets the rows of the property preview, which is a DataView representing the extracted properties from the file names. This property is bound to the view and is updated whenever the property extraction tree changes, reflecting the current set of properties that will be used in the import process.
Public propertyRowsOfPropertyPreview Gets or sets the rows of the property preview, which is a DataView representing the extracted properties from the file names. This property is bound to the view and is updated whenever the property extraction tree changes, reflecting the current set of properties that will be used in the import process.
Public propertyRowsOfTargetTablePreview Gets or sets the rows of the target table preview, which is a DataView representing the target table names derived from the extracted properties of the file names. This property is bound to the view and is updated whenever the property extraction tree changes, reflecting the current set of target table names that will be used in the import process.
Public propertyTableTargetName Gets or sets the target table name for the import process. Can contain placeholders for properties extracted from the file names.
Public propertyTreeController Gets or sets the property extraction tree controller, which manages the display and editing of the property extraction tree. This controller is responsible for handling the logic related to the property extraction process, including adding and removing nodes in the tree structure.
Public propertyUseDocumentCopy Sets whether or not a copy of the document is used. If set to true, a copy of the document is used, so if the controller is not applied, all changes can be reverted. If set to false, no copy must be made. The document is directly changed by the controller, and changes cannot be reverted. Use the last option if a controller higher in the hierarchy has already made a copy of the document.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Public propertyViewObject Gets or sets the GUI element that shows the model to the user.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Top
Methods
 NameDescription
Public methodApply Called when the user input has to be applied to the document being controlled. Returns if applying succeeded.
(Overrides MVCANControllerEditImmutableDocBaseTModel, TViewApply(Boolean))
Protected methodApplyEnd Helper that performs the final steps of the apply operation, optionally disposing the controller.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Protected methodAttachView Override this function to attach the view to the controller, either by subscribing to events of the view, or by setting the controller object on the view.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected methodCheckDocumentInitializedT Checks whether the document has been initialized and throws an exception if it is null.
(Inherited from ControllerBase)
Protected methodDetachView Override this function to detach the view from the controller, either by unsubscribing from events of the view or by setting the controller object on the view to null.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from ControllerBase)
Public methodDispose(Boolean) Releases unmanaged and, optionally, managed resources.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetFileNamePatternsExcluded Gets the file name patterns that are excluded as a list of strings. Please note that the names can contain joker chars, and must be resolved before use.
Public methodGetFileNamePatternsIncluded Gets the file name patterns that are included as a list of strings. Please note that the names can contain joker chars, and must be resolved before use.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetResolvedFileNames Gets the resolved file names of the GUI as a list of strings. This method resolves any wildcard characters in the file names and returns the full paths of the files that match the specified patterns.
Public methodGetSubControllers Enumerates the sub controllers. This function is called on Dispose(Boolean) of this controller to dispose the sub controllers too. By overriding this function, there is no need to override Dispose(Boolean).
(Overrides MVCANControllerEditImmutableDocBaseTModel, TViewGetSubControllers)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodInitialize Basic initialization of the document.
(Overrides MVCANControllerEditImmutableDocBaseTModel, TViewInitialize(Boolean))
Public methodInitializeDocument Initialize the controller with the document. If successful, the function has to return true.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnMadeDirty Fires the MadeDirty event (if it is not suppressed).
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Public methodOnPropertyChanged Raises the PropertyChanged event.
(Inherited from ControllerBase)
Public methodRevert Tries to revert changes to the model, i.e. restores the original state of the model.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected methodThrowIfNotInitializedThrows an exception if the controller is not initialized with a document.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Events
 NameDescription
Public eventMadeDirty Event fired when the user changed some data that will change the model.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Public eventPropertyChangedOccurs when a property value changes.
(Inherited from ControllerBase)
Top
Fields
 NameDescription
Protected field_doc The document to edit. If _useDocumentCopy is , this is a copy of the original document; otherwise, it is the original document itself.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected field_originalDoc The original document. If _useDocumentCopy is , it may have been edited by this controller.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected field_setModelInParentModel If not null, this action is invoked during the apply stage to set the model of this controller in the parent object.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Protected field_suppressDirtyEvent Used to suppress the MadeDirty event of this controller.
(Inherited from MVCANDControllerEditImmutableDocBaseTModel, TView)
Protected field_useDocumentCopy If , a copy of the document is made before editing; this copy can later be used to revert the state of the document to the original state.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Protected field_view The GUI view of this controller.
(Inherited from MVCANControllerEditImmutableDocBaseTModel, TView)
Top
See Also