Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
 public void AddSpawningPoint(Location loc)
 {
     BountyPushpin pin = new BountyPushpin();
     pin.ToolTip = string.Format("{0} (Spawning Point)", BountyName);
     pin.PopupContent = new PopupContentFactory()
             .AppendWikiLink(BountyName)
             .AppendDulfyLink(BountyName)
             .Content;
     pin.Location = loc;
     Children.Add(pin);
 }
Esempio n. 3
0
        public void AddSpawningPoint(Location loc)
        {
            BountyPushpin pin = new BountyPushpin();

            pin.ToolTip      = string.Format("{0} (Spawning Point)", BountyName);
            pin.PopupContent = new PopupContentFactory()
                               .AppendWikiLink(BountyName)
                               .AppendDulfyLink(BountyName)
                               .Content;
            pin.Location = loc;
            Children.Add(pin);
        }
Esempio n. 4
0
        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);
                }
            }
        }