IDiagramModel

StockSharp.Xaml.Diagram.GXDiagram.Model

All diagram models implement this interface or an interface that inherits from this interface.

Propiedades

DataFormat : string

Gets or sets the format of this model's data.

IsChangingModel : bool

This property is true during a call to Boolean), indicating a change happening due to an undo or a redo.

IsInTransaction : bool

True if there is an UndoManager and a transaction has been started.

IsModified : bool

Gets or sets whether this model is considered changed from an earlier state.

Modifiable : bool

Gets or sets whether various model-changing methods are enabled.

Name : string

A name for this model.

NodesSource : IEnumerable

Gets or sets the collection of node data items for the model.

SkipsUndoManager : bool

Gets or sets a flag that controls whether the model notifies any UndoManager that a change has occurred.

UndoManager : UndoManager

Gets or sets the UndoManager for this model.

Métodos

AddCollectionCopy(IDataCollection, ICopyDictionary) : ICopyDictionary

Copy existing data and add to this model.

coll
the collection of data to be copied
env
the ICopyDictionary used to keep track of copied objects; if null, the method will call CreateCopyDictionary, use it, and return it

Devuelve: the updated copy dictionary

AddNode(object)

Add a node data to NodesSource.

nodedata
AddNodeCopy(object) : object

Add a copy of a node data to this model.

nodedata

Devuelve: the copied node data

ChangeModel(ModelChangedEventArgs, bool)

This is called during an Undo or a Redo to actually make state changes to this model or to this model's data.

e
an edit describing the change to be performed
undo
true if undoing; false if redoing
ClearUnresolvedReferences()

Forget all unresolved delayed or forward references.

CommitTransaction(string) : bool

Call the UndoManager's CommitTransaction method.

tname
a String describing the transaction
CreateCopyDictionary() : ICopyDictionary

Create an ICopyDictionary initialized for this model.

Devuelve: Normally this will be an empty dictionary.

CreateDataCollection() : IDataCollection

Create an empty IDataCollection for this model.

CreateInitializedCopy(IDataCollection) : IDiagramModel

Create a copy of this model initialized with different data.

init
this may be null, meaning no initial data

Devuelve: a model of the same type as this

DoNodeAdded(object)

This should be called when a node data object is added to the NodesSource collection.

nodedata
DoNodeKeyChanged(object)

This should be called when a node data's key value may have changed.

nodedata
DoNodeRemoved(object)

This should be called when a node data object is removed from the NodesSource collection.

nodedata
FindNodeByKey(object) : object

Given a key, find the node data with that key.

key
a value of null for this argument will result in the default value for the node data Type

Devuelve: a node data with that key, if it is present in the model; the value will be the default for the type if no such node data is known to be in this model

GetCategoryForNode(object) : string

To help distinguish between different kinds of nodes, each node has a "category" that is just a string.

nodedata

Devuelve: the default category is the empty string

GetConnectedNodesForNode(object) : IEnumerable<object>

Return a sequence of node data that are directly connected to a given node, in either direction.

nodedata

Devuelve: an IEnumerable

GetFromNodesForNode(object) : IEnumerable<object>

Return a sequence of node data that are directly connected by links going into a given node.

nodedata

Devuelve: an IEnumerable

GetNodeType() : Type

Return the Type of the node data.

Devuelve: a Type, not a node data object, nor a string

GetToNodesForNode(object) : IEnumerable<object>

Return a sequence of node data that are directly connected by links coming out from a given node.

nodedata

Devuelve: an IEnumerable

IsLinked(object, object, object, object) : bool

This predicate is true if there is a link from one node data/port to another one.

fromdata
a node key identifying the node data from which the link comes
fromparam
an optional value identifying which port on the "from" node the link is connected to
todata
a node key identify the node data to which the link goes
toparam
an optional value identifying which port on the "to" node the link is connected to

Devuelve: true if there are any links

IsLinkValid(object, object, object, object) : bool

This predicate is true if adding a link between two nodes/ports would result in a valid graph.

fromdata
a node key identifying the node data from which the link comes
fromparam
an optional value identifying which port on the "from" node the link is connected to
todata
a node key identify the node data to which the link goes
toparam
an optional value identifying which port on the "to" node the link is connected to
IsNodeData(object) : bool

This predicate is true if the argument is a node data in this model.

nodedata
the object to be checked to see if it is a known node data in this model

Devuelve: true if the is in the NodesSource

IsNodeType(object) : bool

This predicate is true when the argument is an instance of the node data Type.

nodedata
the arbitrary object to be checked for compatibility to be a node data

Devuelve: true if the can be cast to the the node data Type; false otherwise

RaiseChanged(ModelChangedEventArgs)

Raise a Changed event, given a ModelChangedEventArgs.

e
a ModelChangedEventArgs that describes what changed and how
RemoveNode(object)

Remove node data from NodesSource.

nodedata
RollbackTransaction() : bool

Call the UndoManager's RollbackTransaction method.

StartTransaction(string) : bool

Call the UndoManager's StartTransaction method.

tname
a String describing the transaction

Devuelve: the value of the call to StartTransaction

Eventos

Changed : EventHandler<ModelChangedEventArgs>

The Changed event is raised whenever the model is modified.