MVCANController |
public abstract class MVCANControllerEditOriginalDocBase<TModel, TView> : ControllerBase, IMVCANController, IMVCAController, IMVCController, IDisposable, IApplyController where TModel : ICloneable where TView : class
The MVCANControllerEditOriginalDocBaseTModel, TView type exposes the following members.
Name | Description | |
---|---|---|
MVCANControllerEditOriginalDocBaseTModel, TView | Initializes a new instance of the MVCANControllerEditOriginalDocBaseTModel, TView class |
Name | Description | |
---|---|---|
CreateNotInitializedException | ||
CreateNoViewException | ||
Doc | Gets the current document of this controller. If the document is null, an InvalidOperationException is thrown. To check whether the document is null, check on the member _doc directly. | |
IsDisposed | Get a value indication whether this controller is already disposed. (Inherited from ControllerBase) | |
ModelObject | Returns the document that this controller manages to edit. | |
NoDocumentException | (Inherited from ControllerBase) | |
NotInitializedException | (Inherited from ControllerBase) | |
NoViewException | (Inherited from ControllerBase) | |
UseDocumentCopy | 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 can not be reverted. Use the last option if a controller up in the hierarchie has already made a copy of the document. | |
ViewObject | Returns the Gui element that shows the model to the user. |
Name | Description | |
---|---|---|
Apply | Called when the user input has to be applied to the document being controlled. Returns true if Apply is successfull. | |
ApplyEnd | Standard procedure at the end of the Apply phase. If the applyResult is true, the controller is either disposed (if disposeController is true) or the document is shortly resumed (if disposeController is false. Nothing is done if applyResult is false. | |
AttachView | 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. | |
CheckDocumentInitializedT | (Inherited from ControllerBase) | |
DetachView | Override this function to detach the view from the controller, either by unsubscribing to events of the view, or by setting the controller object on the view to null. | |
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from ControllerBase) | |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
(Overrides ControllerBaseDispose(Boolean)) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetSubControllers | Enumerates the sub controllers. This function is called on Dispose(Boolean) of this controller to dispose the subcontrollers too. By overriding this function, there is no need to override Dispose(Boolean) | |
GetSuspendTokenForControllerDocument | Gets the suspend token for the controller document. This default implementation calls SuspendGetToken() on the document. By overriding this function you can suspend parent nodes in case it is neccessary to modify nodes at lower levels of the hierarchy. | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Initialize | Basic initialization of the document. Here, it is tried to suspend the event handling of the documnt by calling GetSuspendTokenForControllerDocument (but only if _useDocumentCopy is true). | |
InitializeDocument | Initialize the controller with the document. If successfull, the function has to return true. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
OnPropertyChanged | (Inherited from ControllerBase) | |
Revert | Try to revert changes to the model, i.e. restores the original state of the model. | |
ThrowIfNotInitialized | Throws an exception if the controller is not initialized with a document. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
PropertyChanged |
Occurs when a property value changes.
(Inherited from ControllerBase) |
Name | Description | |
---|---|---|
_clonedCopyOfDoc | Cloned copy of the document (is null if _useDocumentCopy is false). Used to revert the edited document to the state before editing. | |
_doc | The document to edit. | |
_suspendToken | The suspend token of the document being edited. If _useDocumentCopy is false, we assume that a controller higher in hierarchy has made a copy of the document, thus we do not use a suspendToken for the document. | |
_useDocumentCopy | If true, 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. | |
_view | The Gui view of this controller |