Exemplo n.º 1
0
 /// <summary>Creates a new <see cref="DiagramEdge"/> instance.</summary>
 public DiagramEdge(DiagramNode source, DiagramNode target, DiagramEdgeRole role, string label) {
    Assumption.NotNull(source);
    Assumption.NotNull(target);
    Role = role;
    Source = source;
    Target = target;
    Label = label.At(0).ToUpper() + label.After(0) + (Role.Has(DiagramEdgeRole.ZeroToMany) ? "*" : "");
    ComputedPath = new PointCollection();
    _initializeResources();
 }
Exemplo n.º 2
0
 // tests whether the given edge has the specified role
 private static bool _hasRole(DiagramEdgeInfo edge, DiagramEdgeRole role) {
    return (edge.Role & role) != 0;
 }