DiagramModel

StockSharp.Xaml.Diagram.GXDiagram.Model

The common base class for all predefined model classes.

Properties

DataFormat
public string DataFormat { get; set; }
value = diagramModel.DataFormat
diagramModel.DataFormat = value

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

HasUndoManager
public bool HasUndoManager { get; }
value = diagramModel.HasUndoManager

Whether undo manager exists. Returns false if the manager is suspended.

Initializing
protected bool Initializing { get; set; }
value = diagramModel.Initializing
diagramModel.Initializing = value

Gets or sets whether the model is being constructed or re-constructed.

IsChangingModel
public bool IsChangingModel { get; protected set; }
value = diagramModel.IsChangingModel
diagramModel.IsChangingModel = value

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

IsInTransaction
public bool IsInTransaction { get; }
value = diagramModel.IsInTransaction

This property is true after a String) and before a corresponding String) or RollbackTransaction.

IsModified
public bool IsModified { get; set; }
value = diagramModel.IsModified
diagramModel.IsModified = value

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

IsUndoManagerSuspended
public bool IsUndoManagerSuspended { get; set; }
value = diagramModel.IsUndoManagerSuspended
diagramModel.IsUndoManagerSuspended = value

Undo manager is suspended if this property is set to true.

Modifiable
public bool Modifiable { get; set; }
value = diagramModel.Modifiable
diagramModel.Modifiable = value

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

Name
public string Name { get; set; }
value = diagramModel.Name
diagramModel.Name = value

A name for this model.

SkipsUndoManager
public bool SkipsUndoManager { get; set; }
value = diagramModel.SkipsUndoManager
diagramModel.SkipsUndoManager = value

Gets or sets a flag that tells ModelChangedEventArgs) whether it should notify any UndoManager that a change has occurred.

UndoManager
public UndoManager UndoManager { get; set; }
value = diagramModel.UndoManager
diagramModel.UndoManager = value

Gets or sets the UndoManager for this model.

Methods

ChangeDataValue
protected virtual void ChangeDataValue(ModelChangedEventArgs e, bool undo)
diagramModel.ChangeDataValue(e, undo)

This is called during undo or redo to effect state changes to model data.

e
an edit describing the change to be performed
undo
true if undoing; false if redoing
ChangeModel
public void ChangeModel(ModelChangedEventArgs e, bool undo)
diagramModel.ChangeModel(e, undo)

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
ChangeModelValue
protected virtual void ChangeModelValue(ModelChangedEventArgs e, bool undo)
diagramModel.ChangeModelValue(e, undo)

This is called during undo or redo to effect state changes to this model.

e
an edit describing the change to be performed
undo
true if undoing; false if redoing
CommitTransaction
public bool CommitTransaction(string tname)
result = diagramModel.CommitTransaction(tname)

Call the UndoManager's CommitTransaction method.

tname
a String describing the transaction

Returns: the value of the call to CommitTransaction

OnChanged
protected virtual void OnChanged(ModelChangedEventArgs e)
diagramModel.OnChanged(e)

Raises the Changed event.

e
an edit describing the change that just happened
RaiseChanged
public void RaiseChanged(ModelChangedEventArgs e)
diagramModel.RaiseChanged(e)

Raise a Changed event, given a ModelChangedEventArgs.

e
an edit describing the change that just happened
RaisePropertyChanged
public void RaisePropertyChanged(string propname, object data, object oldval, object oldparam, object newval, object newparam)
diagramModel.RaisePropertyChanged(propname, data, oldval, oldparam, newval, newparam)

Raise a Changed event for a property change.

propname
a property name
data
the object whose property has just changed
oldval
the previous value for the property
oldparam
additional information for the old value
newval
the new value for the property
newparam
additional information for the new value
RaisePropertyChanged
public void RaisePropertyChanged(string propname, object data, object oldval, object newval)
diagramModel.RaisePropertyChanged(propname, data, oldval, newval)

Raise a Changed event, given before and after values for a particular property.

propname
a property name
data
the object whose property has just changed
oldval
the previous value for the property
newval
the new value for the property
Reinitialize
protected virtual void Reinitialize()
diagramModel.Reinitialize()

Reset the fields that should not be shared from a copy created by MemberwiseClone.

RollbackTransaction
public bool RollbackTransaction()
result = diagramModel.RollbackTransaction()

Call the UndoManager's RollbackTransaction method.

Returns: the value of the call to RollbackTransaction

StartTransaction
public bool StartTransaction(string tname)
result = diagramModel.StartTransaction(tname)

Call the UndoManager's StartTransaction method.

tname
a String describing the transaction

Returns: the value of the call to StartTransaction

Events

Changed
public event EventHandler<ModelChangedEventArgs> Changed
diagramModel.Changed += handler

The Changed event is raised whenever the model is modified.