ICompositionModel

StockSharp.Diagram

Модель CompositionDiagramElement.

Реализует: ICloneable<ICompositionModel>, ICloneable

Свойства

Behavior
public object Behavior { get; }
value = iCompositionModel.Behavior

ICompositionModelBehavior

Elements
public IEnumerable<DiagramElement> Elements { get; }
value = iCompositionModel.Elements

Детские элементы.

HasErrors
public bool HasErrors { get; }
value = iCompositionModel.HasErrors

Проверить составной элемент на наличие ошибок в диаграмме.

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

Ундо менеджера приостанавливается, если это свойство установлено на истинность.

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

Is it possible to edit a composite element diagram.

UndoManager
public IUndoManager UndoManager { get; set; }
value = iCompositionModel.UndoManager
iCompositionModel.UndoManager = value

IUndoManager

Методы

AddElement
public void AddElement(DiagramElement element, PointF location)
iCompositionModel.AddElement(element, location)

Добавить элемент.

element
Элемент диаграммы.
location
Положение элемента.
FindElementByKey
public DiagramElement FindElementByKey(string key)
result = iCompositionModel.FindElementByKey(key)

Найти элемент по уникальному ключу.

key
Ключ.

Возвращает: DiagramElement

GetConnectedSocketsFor
public IEnumerable<DiagramSocket> GetConnectedSocketsFor(DiagramElement element, DiagramSocket socket)
result = iCompositionModel.GetConnectedSocketsFor(element, socket)

Подключите розетки.

element
DiagramElement
socket
DiagramSocket

Возвращает: Подключенные розетки.

GetDisconnectedSockets
public IEnumerable<ValueTuple<string, DiagramSocket>> GetDisconnectedSockets()
result = iCompositionModel.GetDisconnectedSockets()

Получите отключенные розетки.

Возвращает: Отключенные розетки.

GetElementKey
public string GetElementKey(DiagramElement element)
result = iCompositionModel.GetElementKey(element)

Получить уникальный ключ элемента.

element
DiagramElement

Возвращает: Ключ.

События

ElementAdded
public event Action<DiagramElement> ElementAdded
iCompositionModel.ElementAdded += handler

Событие добавления дочернего элемента.

ElementRemoved
public event Action<DiagramElement> ElementRemoved
iCompositionModel.ElementRemoved += handler

Событие удаления дочернего элемента.

ModelChanged
public event Action ModelChanged
iCompositionModel.ModelChanged += handler

Изменено мероприятие.