ModelChangedEventArgs

StockSharp.Xaml.Diagram.GXDiagram.Model

This class represents a change to a model.

Inherits: PropertyChangedEventArgs

Implements: IUndoableEdit

Constructors

ModelChangedEventArgs
public ModelChangedEventArgs()
modelChangedEventArgs = ModelChangedEventArgs()

The empty/default constructor produces an EventArgs whose properties still need to be initialized.

ModelChangedEventArgs
public ModelChangedEventArgs(string pname, object data, object oldval, object newval)
modelChangedEventArgs = ModelChangedEventArgs(pname, data, oldval, newval)

This constructor initializes the mostly commonly used properties.

pname
the PropertyName property
data
the Data property
oldval
the OldValue property
newval
the NewValue property
ModelChangedEventArgs
public ModelChangedEventArgs(ModelChangedEventArgs e)
modelChangedEventArgs = ModelChangedEventArgs(e)

This is basically a "copy constructor", making a copy of the given ModelChangedEventArgs.

e

Properties

Change
public ModelChange Change { get; set; }
value = modelChangedEventArgs.Change
modelChangedEventArgs.Change = value

Gets or sets the kind of change that this represents.

Data
public object Data { get; set; }
value = modelChangedEventArgs.Data
modelChangedEventArgs.Data = value

Gets or sets the data object, part of the model, that was modified.

Model
public IDiagramModel Model { get; set; }
value = modelChangedEventArgs.Model
modelChangedEventArgs.Model = value

Gets or sets the IDiagramModel that has been modified.

NewParam
public object NewParam { get; set; }
value = modelChangedEventArgs.NewParam
modelChangedEventArgs.NewParam = value

Gets or sets an optional value associated with the new value.

NewValue
public object NewValue { get; set; }
value = modelChangedEventArgs.NewValue
modelChangedEventArgs.NewValue = value

Gets or sets the next or current value that the property has.

OldParam
public object OldParam { get; set; }
value = modelChangedEventArgs.OldParam
modelChangedEventArgs.OldParam = value

Gets or sets an optional value associated with the old value.

OldValue
public object OldValue { get; set; }
value = modelChangedEventArgs.OldValue
modelChangedEventArgs.OldValue = value

Gets or sets the previous or old value that the property had.

Methods

CanRedo
public bool CanRedo()
result = modelChangedEventArgs.CanRedo()

This predicate returns true if you can call Redo.

CanUndo
public bool CanUndo()
result = modelChangedEventArgs.CanUndo()

This predicate returns true if you can call Undo.

Clear
public void Clear()
modelChangedEventArgs.Clear()

Forget any references that this object may have.

GetParam
public object GetParam(bool undo)
result = modelChangedEventArgs.GetParam(undo)

This is a convenient method to get the right parameter value, depending on the value of .

undo

Returns: either OldParam or NewParam

GetValue
public object GetValue(bool undo)
result = modelChangedEventArgs.GetValue(undo)

This is a convenient method to get the right value, depending on the value of .

undo

Returns: either OldValue or NewValue

Redo
public void Redo()
modelChangedEventArgs.Redo()

Re-perform the document change after an Undo by calling Boolean).

ToString
public override string ToString()
result = modelChangedEventArgs.ToString()

Produce a human-readable description of the change to the model.

Undo
public void Undo()
modelChangedEventArgs.Undo()

Reverse the effects of this document change by calling Boolean).