[IoId("00000000-DC38-437F-B0BE-05B2D1E12592")]
[Author("DavidR")]
public class DateTimeParameter : Parameter<DateTime>
Default implementation for parameters containing DateTime values.
Constructors
Properties
Access
Gets the access for this parameter, i.e. whether it treats data as items, lists or trees.
Implements: Access
AccessVariability
Gets or sets the variability allowance of the access level. If this variability is anything other than None, the parameter will provide menu UI for changing its access state.
Implements: AccessVariability
Activity
Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
Implements: Activity
Implements: Attributes
ChildrenObjects
Gets all immediate child objects that belong to the current object. It is possible that an object does not have any children, and it is possible that a child object has children of its own.
Implements: ChildrenObjects
ColourOverride
Gets or sets the colour override for the display of this object.
Implements: ColourOverride
Connectivity
Gets the topological connectivity of this object. The topology is not updated automatically, so be sure to get a fresh instance every time you need it.
Overrides: DocumentObject.Connectivity
Implements: Connectivity
CustomValues
Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
Implements: CustomValues
Display
Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
Implements: Display
inherited fromActiveObject
DisplayCapable
Gets whether this object makes allowance for 3D viewport displays.
Implements: DisplayCapable
DisplayName
Overrides: DocumentObject.DisplayName
Implements: DisplayName
DisplayStyle
Gets or sets the display style to use for the geometric data inside this object. Note that this property is meaningless for certain types of object.
Implements: DisplayStyle
Document
Gets or sets the document this object belongs to. It is possible an object does not belong to any document, however it can never belong to more than one document simultaneously.
Implements: Document
EntireFamily
Enumerates over all objects in the hierarchy this object is part of. This enumeration starts at the root object and then continues over all children and grandchildren in a breadth-first fashion.
Implements: EntireFamily
Expression
Gets the expression associated with the expression text, if the text is not null/empty and a valid expression. Note that if the AbstractParameter.ExpressionEnabled property is set to false, this property still returns an expression if it can.
ExpressionEnabled
Gets or sets whether the expression is taken into consideration.
ExpressionText
Gets or sets the expression text for this parameter.
FallbackName
Gets or sets a fallback name to be used as DisplayName in case the UserName is null or empty.
Implements: FallbackName
FoundingObject
Gets the root or founding object in the object hierarchy. If the current object does not have a parent, it is a founding object.
Implements: FoundingObject
HardMetaData
Gets or sets the hard meta data to assign to all values passing through this parameter. Hard meta data is always assigned and may overwrite existing meta data with the same keys.
Implements: HardMetaData
Implements: Icon
Inputs
Gets the input parameters. This list only includes parameters that are connected through wires, it does not include globals this parameter depends on.
Implements: Inputs
InstanceId
Gets or sets the instance Id for this object. The instance Id should be different for every instance of every type. Do *not* assign this Id unless you know exactly what you are doing.
Implements: InstanceId
Kind
Gets the parameter station (in life). Input, output, floating or other.
public Kind Kind { get; }
Implements: Kind
ModifierIcons
Gets an array of all the state icons for this parameter.
Implements: ModifierIcons
Modifiers
Gets or sets the modifiers associated with this parameter.
Implements: Modifiers
Implements: Nomen
Implements: Obsolete
Outputs
Gets the output parameters. This list only includes parameters that are connected through wires, it does not include objects that in some other way depend on this parameter.
Implements: Outputs
ParentObject
Gets or sets the parent object that owns this object. Top-level objects do not have parents. Do not assign or remove parents unless you know exactly what you are doing.
Implements: ParentObject
PersistentData
Implements: PersistentData
PersistentDataWeak
Overrides: AbstractParameter.PersistentDataWeak
Implements: PersistentDataWeak
Implements: Phase
PostProcessInputTrees
Assign this method if you wish to process the trees harvested from source parameters before they are converted into a single, type compatible tree. Do note that any type conversions that occur here will not be included in the conversion record. Also note that this property must be assigned every time as it cannot be (de)serialised.
Implements: PostProcessInputTrees
Presets
Implements: Presets
PresetsWeak
Overrides: AbstractParameter.PresetsWeak
Implements: PresetsWeak
ProgressPercentage
Gets the progress as a percentage. If this object is currently not calculating a new solution, this number is not meaningful.
Implements: ProgressPercentage
Relevance
Gets or sets the auxiliary state of this object. Auxiliary objects are drawn in an inconspicuous way as they are considered in-between logic. Note that this property is meaningless for certain types of object.
Implements: Relevance
Requirement
Gets or sets the data requirement for this parameter. Requirement typically only make sense as component inputs, but the property exists on all parameters.
Implements: Requirement
Implements: Selected
Selection
Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
Implements: Selection
SiblingObjects
Gets all sibling objects in the object family tree.
Implements: SiblingObjects
SoftMetaData
Gets or sets the soft meta data to assign to all values passing through this parameter. Soft meta data is only assigned when it won't overwrite existing meta data with the same keys.
Implements: SoftMetaData
State
Gets the current state of this object. This is always the most recently completed state.
Overrides: DocumentObject.State
TypeAssistant
Each parameter type ought to provide an assistant. However this property may return null, in which case a lot of functionality will not be available.
Implements: TypeAssistant
TypeAssistantWeak
Overrides: AbstractParameter.TypeAssistantWeak
Implements: TypeAssistantWeak
TypeFlavour
Gets the flavour of the type this parameter contains.
Implements: TypeFlavour
Implements: UserName
Methods
AddUndoRecord
Add a custom undo record for this object.
public void AddUndoRecord()
Record
record
Undo record to add.
Returns: Id of undo record.
Implements: AddUndoRecord
AddUndoRecord
Add a single action undo record for this object.
Returns: Id of undo record.
Implements: AddUndoRecord
AppendCleaningModifiers
Append the parameter modifiers to do with cleaning, (Remove Empty Twig, Remove Nulls, Remove Invalid).
AppendCustomModifiers
Override this method to append a bar with custom modifiers, or, if you really want, mess with the already added input panel elements.
AppendDataElements
Append the parameter persistent data setters. (Clear, Internalise, Set One, Set Many, Edit).
AppendExpressionModifier
Append the expression modifier UI to the input panel. Override this method and do nothing to disable expressions on this parameter.
AppendModifierIcons
Override this method if you with to add your own modifier icons to this parameter.
AppendOrderingModifierElements
Append the parameter modifiers to do with item ordering, (Sort, Randomise, Reverse).
AppendStateInput
Append the 'Enabled' and 'Display' states to this input panel.
protected void AppendStateInput()
panel,
Panel to append to.
enabledState,
If true, the Enabled state button will be modifiable.
displayState
If true, the Display state button will be modifiable.
AppendToInputPanel
Overrides: DocumentObject.AppendToInputPanel
Implements: AppendToInputPanel
AppendTopologyModifierElements
Append all default modifier options.
AppendUserNameInput
Append the user name text box within a category labelled 'Attributes'.
AppendVariableAccessElements
Append the group of input access variability inputs (Item, Twig, Tree), depending on parameter state.
ChangeInstanceIds
ClearModifierIcons
Implements: ClearModifierIcons
CollectFromPersistent
Overrides: AbstractParameter.CollectFromPersistent
CollectFromSources
Overrides: AbstractParameter.CollectFromSources
Compute
Compute a new solution for this object, or return a completed solution if one is available.
Returns: Result of computation.
Overrides: DocumentObject.Compute
ComputeInternal
Overrides: ActiveObject.ComputeInternal
CreateAttributes
Create default attributes for this object. If attributes already exist, this method will not replace them.
Overrides: DocumentObject.CreateAttributes
CreateDisplayFromTree
Override this method to populate displays.
CreateEmptyTree
Create an empty tree which can be used as a placeholder for null data in solution results.
Overrides: AbstractParameter.CreateEmptyTree
CreateValueControl
Construct a lightweight control suitable for editing this parameter's value. Control provider is responsible for handling undo record and assigning changes. Return null if no control makes sense in any particular case. Note that the control which is returned by this method may never be shown.
public virtual Control CreateValueControl()
DisplayBounds
Overrides: DocumentObject.DisplayBounds
DisplayFaces
Overrides: DocumentObject.DisplayFaces
DisplayWires
Overrides: DocumentObject.DisplayWires
EditMetaData
Pop up the hard and soft meta data editor.
public void EditMetaData()
EditPersistentValues
Show the persistent values editor.
Expire
Expire this object and all objects that depend on it. This will request-cancel any running solutions inside whatever document contains this object.
public sealed override void Expire()
Overrides: DocumentObject.Expire
ExpireAllRecipients
protected override void ExpireAllRecipients()
Overrides: ActiveObject.ExpireAllRecipients
ExpireDisplay
Expire the attributes and raise the DisplayChanged event.
protected void ExpireDisplay()
ExpireReferences
Expire all references which match a validator method.
Returns: True if the object state was modified due to a reference change.
Overrides: AbstractParameter.ExpireReferences
Implements: ExpireReferences
GetAllSourceTrees
GetCreationInfo
Gets information about who created this component and when.
Returns: True if the creation data was available.
Implements: GetCreationInfo
GetModificationInfo
Gets information about who last modified this component and when.
Returns: True if the modification data was available.
Implements: GetModificationInfo
InvalidateExistingLayout
Invalidate the attribute layout, but only if the attributes already exist.
protected void InvalidateExistingLayout()
LoadNewPersistentData
Utility function for overriding persistent data. This method will:
- Add an undo record for the current persistent data.
- Assign new persistent data.
- Expire the parameter.
- Trigger a new solution on the document which owns this parameter.
protected void LoadNewPersistentData()
params T[]
values
LoadNewPersistentData
Utility function for overriding persistent data. This method will:
- Add an undo record for the current persistent data.
- Assign new persistent data.
- Expire the parameter.
- Trigger a new solution on the document which owns this parameter.
ModifyAndProcessResult
Apply the modifiers and the AbstractParameter.ProcessResult(Solution, SolutionData) method. This is automatically called as part of the standard AbstractParameter.ComputeInternal(Solution, CallStack) logic, so unless you're overriding that, you have no need of this method.
ModifyIcon
Override the icon for this object. Use this judiciously.
Implements: ModifyIcon
ModifyNameAndInfo
Programmatically modify the nickname, name and/or info strings on the Nomen.
Implements: ModifyNameAndInfo
Implements: OnDisplayChanged
OnExpired
Raise the Expired event.
protected internal void OnExpired()
Implements: OnLayoutChanged
OverrideAccess
Method for overriding the access. You almost never want to change this yourself, which is why this functionality is hidden behind this method.
OverrideAccess
Override the access of this parameter. This is dangerous and almost never needed at runtime. Consider enabling AbstractParameter.AccessVariability if the access needs to change over time.
OverrideAttributes
Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
Returns: True if attributes were accepted.
Implements: OverrideAttributes
PickManyItems
Default implementation will show a multi-line text box.
Overrides: AbstractParameter.PickManyItems
PickOneItem
Default implementation will show a text box provided there's an assisatant which supports roundtripping.
Overrides: AbstractParameter.PickOneItem
PopulateDisplay
protected sealed override void PopulateDisplay()
Overrides: ActiveObject.PopulateDisplay
ProcessResult
Override this method if you wish to post-process the default result of this parameter. The intermediate result will either contain the merged tree of all source objects or the persistent data, processed by the parameter modifiers. It will also contain all relevant type conversion messaging. You may choose to replace the data in the intermediate result, add messages, or create an entirely new Result instance, but do note that the intermediate may contain a lot of useful messaging.
protected virtual SolutionData ProcessResult()
solution,
Solution associated with this result.
intermediateResult
Default result computed by the standard parameter implementation.
Returns: Identical, modified or different Result.
RequestAutoSave
Request an autosave.
public AutoSaveResult RequestAutoSave()
reason,
Autosave reason.
autosaveId
Autosave Id. Consecutive requests with identical Ids are ignored.
Implements: RequestAutoSave
RequestAutoSave
Request an autosave using the instance ID of this object as a filter. This means hat subsequent autosave requests coming from the same object will be ignored.
Implements: RequestAutoSave
Set
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(Pear<T>[]) method can be chained.
Set
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(T[]) method can be chained.
Set
Set all persistent data. This method overwrites whatever persistent data may already be set.
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(Tree<T>) method can be chained.
SetCreationInfo
Set the CreatedBy and CreatedAt fields if they haven't been set already.
public void SetCreationInfo()
Implements: SetCreationInfo
SetModificationInfo
Set the ModifiedBy and ModifiedAt fields.
public void SetModificationInfo()
Implements: SetModificationInfo
SetProgressPercentage
Set the DocumentObject.ProgressPercentage field directly. The percentage is automatically limited to the [0, 100] interval.
SetProgressPercentage
Set the DocumentObject.ProgressPercentage field based on a step count. This method always limits the percentage to the [1, 99] range, as 0% and 100% are oftentimes indicative of unstarted or completed processes, which probably gives the wrong impression.
Store
This method is called whenever the instance is required to serialize itself.
Overrides: AbstractParameter.Store
Implements: Store
UpdateDisplay
Overrides: DocumentObject.UpdateDisplay
VolatileDataDescription
Gets a set of strings which describe the current state of this parameter. This is used primarily to populate tooltip content.
Events
ActivityChanged
Raised whenever the Enabled state of this object changes.
Implements: ActivityChanged
AutosaveRequested
Raised whenever this object requests an autosave.
Implements: AutosaveRequested
ColourOverrideModified
DisplayChanged
Raised whenever the display state of this object changes.
Implements: DisplayChanged
DocumentChanged
Raised whenever this object becomes part of a different document.
Implements: DocumentChanged
Expired
Raised whenever the solution currently held by this object is expired.
Implements: Expired
InstanceIdChanged
Raised whenever the InstanceId of this object changes.
Implements: InstanceIdChanged
LayoutChanged
Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
Implements: LayoutChanged
NameChanged
Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
Implements: NameChanged
RelevanceChanged
Raised whenever the Auxiliary state of this object changes.
Implements: RelevanceChanged
SelectedChanged
Raised whenever the Selected state of this object changes.
Implements: SelectedChanged