MtxDialog Class

Source: Controls/BaseMtxDialog.cs · Assembly: Dew.Math.Controls
ComponentTMtxComponentMtxDialog

public class MtxDialog : TMtxComponent

Abstract class for component editors

Derive classes from this component to create component specific dialogs. The new class should override InternalExecute method which provides a way to update the dialog with the property values of the edited component and redeclare the Source property to reflect the new type of the component for which to display the dialog. The dialog (Form) class type will be determined by calling the TMtxComponent.EditorClass function. The displayed dialog should write new values directly to the edited component. The cancel feature can be implemented by creating a copy of the edited component while the dialog is being updated by the InternalExecute method.

Properties

NameTypeDescription
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
DockingBooleanIf true, the user will be able to dock the component editor.
EditorActiveBooleanReturns True, if the component editor is displayed.
FormTextStringDefines Form Text. The text will not be changed if this property is empty.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
RegistryPathStringDefines the registry path to which the settings of FloatEdit controls residing on the displayed dialog will stored.
ShowLiveBooleanIf true, all updates made to the properties on the dialog will trigger recalculation of the component.
SourceTMtxComponentDefines the control for which a control editor should be displayed.
StoreInRegistryBooleanIf true, the values of FloatEdit controls residing on the dialog will be saved to registry. This allows the user to keep the Increment and value formating between different sessions.
TopMostBooleanIf true, the form will always appear above all other forms.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
ctor
CurrentSourceReturns the current control to be edited. This is not the same as . The derived controls can override this function.
EditorClassTo be overriden in descendanr classses.
Execute (2)Call execute to show the control editor. The method can be called many times, if the dialog is running and will bring its window to the front.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
ReferenceRemoved
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.

Events

NameDescription
BeforeUpdateThe event is called just before the edit controls on the dialog box get updated.