public void AddPath(LocationCollection polyPoints, SolidColorBrush brush, PathDirectionType direction) { MapPolygon poly = new MapPolygon(); poly.Opacity = 0.8; poly.StrokeThickness = 3; poly.Stroke = brush; poly.Locations = polyPoints; Children.Add(poly); int numPoints = 1; while (numPoints * 10 < polyPoints.Count) numPoints *= 2; for (int i = 0; i < numPoints; i++) { int j = i * (polyPoints.Count / numPoints); if (j < polyPoints.Count) { Location loc = polyPoints[j]; BountyPushpin pin = new BountyPushpin(); pin.ToolTip = string.Format("{0} ({1}Path)", BountyName, (direction == PathDirectionType.Invalid ? string.Empty : Enum.GetName(typeof(PathDirectionType), direction) + " ")); pin.PopupContent = new PopupContentFactory() .AppendWikiLink(BountyName) .AppendDulfyLink(BountyName) .Content; pin.Location = loc; Children.Add(pin); } } }
public void AddPath(LocationCollection polyPoints, SolidColorBrush brush, PathDirectionType direction) { MapPolygon poly = new MapPolygon(); poly.Opacity = 0.8; poly.StrokeThickness = 3; poly.Stroke = brush; poly.Locations = polyPoints; Children.Add(poly); int numPoints = 1; while (numPoints * 10 < polyPoints.Count) { numPoints *= 2; } for (int i = 0; i < numPoints; i++) { int j = i * (polyPoints.Count / numPoints); if (j < polyPoints.Count) { Location loc = polyPoints[j]; BountyPushpin pin = new BountyPushpin(); pin.ToolTip = string.Format("{0} ({1}Path)", BountyName, (direction == PathDirectionType.Invalid ? string.Empty : Enum.GetName(typeof(PathDirectionType), direction) + " ")); pin.PopupContent = new PopupContentFactory() .AppendWikiLink(BountyName) .AppendDulfyLink(BountyName) .Content; pin.Location = loc; Children.Add(pin); } } }
private static GuildBounty AddPath(this GuildBounty bounty, double[,] points, PathDirectionType direction = PathDirectionType.Invalid) { if (bounty.Paths == null) bounty.Paths = new List<GuildBountyPath>(); GuildBountyPath path = new GuildBountyPath() { Direction = direction }; path.Points = new List<List<double>>(); for (int i = 0; i*2 < points.Length; i++) path.Points.Add(new List<double> { points[i, 0], points[i, 1] }); bounty.Paths.Add(path); return bounty; }
// Set error row disposition on column level for components that support it e.g. derived column. public void SetColumnDisposition(string columnName, RowDispositionType rowDispositionType, RowFailureType rowFailureType, PathDirectionType direction) { dynamic column; if (direction == PathDirectionType.Input) { column = Meta.InputCollection[0].InputColumnCollection[columnName]; } else { column = Meta.OutputCollection[0].OutputColumnCollection[columnName]; } SetDisposition(column, rowDispositionType, rowFailureType); }