public UmlAssociationModel(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point connectorStartHint, Point connectorEndHint, ISketchItemContainer container) : base(type, from, to, connectorStartHint, connectorEndHint, container) { UpdateGeometry(); }
public UmlDependencyModel(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point connectorStartHint, Point connectorEndHint, ISketchItemContainer container) : base(type, from, to, connectorStartHint, connectorEndHint, container) { StrokeDashArray = new DoubleCollection(_dashPattern); }
public UmlMessageModel(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point connectorStartHint, Point connectorEndHint, ISketchItemContainer container) : base(ConnectionType.StrightLine, from, to, connectorStartHint, connectorEndHint, container) { Label = "message()"; UpdateGeometry(); }
public ConnectorModel(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, System.Windows.Point connectorStartHint, System.Windows.Point connectorEndHint, ISketchItemContainer container) //:base(new Guid()) { ParentNode = container; _connectionType = type; MiddlePointRelativePosition = 0.5; From = from; To = to; _myConnectorStrategy = ConnectorUtilities.GetConnectionType(this, _connectionType, connectorStartHint, connectorEndHint); Label = string.Format("{0}->{1}", from.Label, to.Label); LineWidth = 1; _geometry.Children.Add(_path); Initialize(); }
public static IEnumerable <ConnectorModel> GetConnectorsWithSameEndpoints(IEnumerable <ConnectorModel> siblings, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point start, Point end) { List <ConnectorModel> sameEndpoints = new List <ConnectorModel>(); if (siblings != null) { foreach (var x in siblings) { if ((x.From == from && x.To == to) || (x.To == from && x.From == to)) // same connection, eventually reversed { if ((x.ConnectorStart == start && x.ConnectorEnd == end) || x.ConnectorStart == end && x.ConnectorEnd == start) { sameEndpoints.Add(x); } } } } return(sameEndpoints); }
public RewireConnectorOperation(ISketchItemDisplay pad, ConnectorModel model, Point p) { _connector = model; _pad = pad; IBoundedSketchItemModel ending = model.To; if (ending == null) { ending = model.From; } var start = ConnectorUtilities.ComputeCenter(ending.Bounds); _selector = new ConnectablePairSelector(start, p); _pad.Canvas.Children.Add(_selector); _selector.Visibility = Visibility.Visible; foreach (var ch in _pad.Canvas.Children.OfType <ISketchItemUI>()) { ch.Disable(); } _pad.Canvas.MouseMove += HandleMouseMove; _pad.Canvas.MouseDown += HandleMouseDown; _pad.Canvas.KeyDown += HandleKeyDown; }
public UmlActivityDiagramEdge(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point connectorStartHint, Point connectorEndHint, ISketchItemContainer container) : base(type, from, to, connectorStartHint, connectorEndHint, container) { }
public UmlGeneralizationModel(ConnectionType type, IBoundedSketchItemModel from, IBoundedSketchItemModel to, Point connectorStartHint, Point connectorEndHint, ISketchItemContainer container) : base(type, from, to, connectorStartHint, connectorEndHint, container) { }