using System.Collections.Generic; using AIStudio.Wpf.DiagramDesigner.Serializable.ViewModels; namespace AIStudio.Wpf.DiagramDesigner.Serializable { /// /// /// public class DiagramData { /// /// Gets or sets the nodes. /// /// /// The nodes. /// public DiagramNode[] Nodes { get; set; } /// /// Gets or sets the links. /// /// /// The links. /// public DiagramLink[] Links { get; set; } /// /// Gets or sets the groups. /// /// /// The groups. /// public DiagramGroup[] Groups { get; set; } /// /// Initializes a new instance of the class. /// public DiagramData() { Nodes = new DiagramNode[0]; Links = new DiagramLink[0]; Groups = new DiagramGroup[0]; } } /// /// DiagramNode /// public class DiagramNode { /// /// Gets or sets the identifier. /// /// /// The identifier. /// public string Id { get; set; } /// /// Gets or sets the parent identifier. /// /// /// The parent identifier. /// public string ParentId { get; set; } /// /// Gets or sets the name. /// /// /// The name. /// public string Name { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string Color { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string LineColor { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string FontColor { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public double FontSize { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string CornerRadius { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string BorderThickness { get; set; } /// /// Gets or sets the label. /// /// /// The label. /// public string Label { get; set; } /// /// Gets or sets the width. /// /// /// The width. /// public double Width { get; set; } /// /// Gets or sets the height. /// /// /// The height. /// public double Height { get; set; } /// /// Gets or sets the x. /// /// /// The x. /// public double X { get; set; } /// /// Gets or sets the y. /// /// /// The y. /// public double Y { get; set; } /// /// Gets or sets the type. /// /// /// The type. /// public string Type { get; set; } /// /// Gets or sets the index of the z. /// /// /// The index of the z. /// public int ZIndex { get; set; } /// /// Gets or sets the port alignment list. /// /// /// The port alignment list. /// public List PortAlignmentList { get; set; } public bool IsInnerConnector { get; set; } public List PortRatio { get; set; } public virtual DiagramItemViewModel ToNodel(IDiagramViewModel diagramViewModel) { return new DiagramItemViewModel(diagramViewModel); } } /// /// /// public class DiagramLink { /// /// Gets or sets the identifier. /// /// /// The identifier. /// public string Id { get; set; } /// /// Gets or sets the color. /// /// /// The color. /// public string Color { get; set; } /// /// Gets or sets the color of the selected. /// /// /// The color of the selected. /// public string SelectedColor { get; set; } /// /// Gets or sets the width. /// /// /// The width. /// public double Width { get; set; } /// /// Gets or sets the label. /// /// /// The label. /// public string Label { get; set; }//TODO /// /// Gets or sets the source identifier. /// /// /// The source identifier. /// public string SourceId { get; set; } /// /// Gets or sets the target identifier. /// /// /// The target identifier. /// public string TargetId { get; set; } /// /// Gets or sets the source port alignment. /// /// /// The source port alignment. /// public string SourcePortAlignment { get; set; } /// /// Gets or sets the target port alignment. /// /// /// The target port alignment. /// public string TargetPortAlignment { get; set; } /// /// Gets or sets the type. /// /// /// The type. /// public string Type { get; set; } /// /// Gets or sets the index of the z. /// /// /// The index of the z. /// public int ZIndex { get; set; } = -1; /// /// Gets or sets the router. /// /// /// The router. /// public string Router { get; set; } /// /// Gets or sets the path generator. /// /// /// The path generator. /// public string PathGenerator { get; set; } /// /// Gets or sets the source marker path. /// /// /// The source marker path. /// public string SourceMarkerPath { get; set; } /// /// Gets or sets the width of the source marker. /// /// /// The width of the source marker. /// public double? SourceMarkerWidth { get; set; } /// /// Gets or sets the target marker path. /// /// /// The target marker path. /// public string TargetMarkerPath { get; set; } /// /// Gets or sets the width of the target marker. /// /// /// The width of the target marker. /// public double? TargetMarkerWidth { get; set; } } /// /// /// public class DiagramGroup { /// /// Gets or sets the flow node ids. /// /// /// The flow node ids. /// public List FlowNodeIds { get; set; } = new List(); } }