Click or drag to resize

MultiRenameData Class

Data neccessary to rename a list of objects (but can also used for instance for exporting a list of objects). The idea behind is to have a bunch of shortcuts, like [N], that can be used as variables for the rename operation. Since using this class is somewhat complex, see the remarks for the details.
Inheritance Hierarchy
SystemObject
  Altaxo.Gui.Common.MultiRenameMultiRenameData

Namespace: Altaxo.Gui.Common.MultiRename
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class MultiRenameData

The MultiRenameData type exposes the following members.

Constructors
 NameDescription
Public methodMultiRenameDataInitializes a new instance of the MultiRenameData class
Top
Properties
 NameDescription
Public propertyColumnsOfObjectInformation Stores columns of information for the objects to rename. Key is the column name. Value is a function which retrieves a string for each object, that appears as text in the column. The first argument of the function is the object (DataTable, Graph, etc.). The second argument is the new calculated name. Note that it is assumed that the first list item corresponds to the old name of the object. This is shown in the first column. The second column is reserved for the new name. Then the other columns follow.
Public propertyDefaultPatternStringGets or sets the default pattern string, i.e. the pattern string that is initially shown when the multi rename dialog opens.
Public propertyIsRenameOperationFileSystemBased Sets a value indicating whether the rename operation is file system based (if the names refer to file names).
Public propertyObjectsToRenameCountReturn the number of objects to be processed (renamed etc).
Public propertyShowExistingFileInformation Gets or sets a value indicating whether the generated names are existing files, and it is shown if these files exist.
Top
Methods
 NameDescription
Public methodAddObjectsToRename Adds the provided objects to the list of objects to be renamed.
Public methodDoRename Calls the function that finally process the items, for instance rename them, export them etc.
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 methodGetArrayShortcuts Retrieves the names of all array shortcuts.
Public methodGetDateTimeShortcuts Retrieves the names of all DateTime shortcuts.
Public methodGetDateTimeValueOfShortcutGets the value of a DateTime shortcut.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetIntegerShortcuts Retrieves the names of all integer shortcuts.
Public methodGetIntegerValueOfShortcutGets the integer value of a integer shortcut.
Public methodGetListValue Retrieves the value of the Gui list, given the column and the row number.
Public methodGetNewNameForObject Gets the proposed new name for the object at position i.
Public methodGetNewNameForObjectOrNull Gets the proposed new name for the object at position i. If a new name was not already set, the return value is null.
Public methodGetObjectToRenameGets the i-th object to rename.
Public methodGetShortcutDescriptionGets the description of a shortcut.
Public methodGetStringArrayValueOfShortcutGets the value of an array shortcut.
Public methodGetStringShortcuts Retrieves the names of all string shortcuts.
Public methodGetStringValueOfShortcutGets the value of a string shortcut.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRegisterDateTimeShortcutRegisters a DateTime shortcut.
Public methodRegisterIntegerShortcutRegisters an integer shortcut.
Public methodRegisterListColumn(String, FuncObject, String, String) Register a column for a Gui list that shows the properties of the objects to rename, for instance its old name, its creation date, its new name etc.
Public methodRegisterListColumn(String, FuncObject, String) Register a column for a Gui list that shows the properties of the objects to rename, for instance its old name, its creation date, its new name etc.
Public methodRegisterRenameActionHandlerRegisters the rename action handler. This handler is called when the items should be processed (renamed, exported or so). If the function succeeds, the return value should be zero or an empty list. If the function is partially unsuccessfull, for instance because some items could not be renamed, the function should return those unsuccessfully processed items in the list.
Public methodRegisterStringArrayShortcutRegisters an array shortcut.
Public methodRegisterStringShortcutRegisters a string shortcut.
Public methodSetNewNameForObjectSets the proposed new name for object. Note that the object is not renamed here, instead this is done when calling the rename handler.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
Momentarily, four different types of shortcuts are implemented: An Integer shortcut provide a number, a string shortcuts provides a string, a DateTime shortcut a DateTime value and an Array shortcut provides a string array. In order to use this class for rename operations, after creating an instance of this class you have to:
See Also