AsterixDisplayAnalyser.WaypointDisplay.Build C# (CSharp) Метод

Build() публичный статический Метод

public static Build ( GMap.NET.WindowsForms.GMapOverlay &OverlayOut ) : void
OverlayOut GMap.NET.WindowsForms.GMapOverlay
Результат void
        public static void Build(ref GMapOverlay OverlayOut)
        {
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Display defined radars
            //
            string FileName = @"C:\ASTERIX\IMAGES\waypoint.jpg";
            Image WaypointImage = Image.FromFile(FileName);

            DisplayAttributes.DisplayAttributesType WaypointDisplayAttribute = DisplayAttributes.GetDisplayAttribute(DisplayAttributes.DisplayItemsType.Waypoint);

            WaypointImage = GraphicUtilities.ResizeImage(WaypointImage, new Size(WaypointDisplayAttribute.ImageSize.Width, WaypointDisplayAttribute.ImageSize.Height), false);

            // Here loop through defined waypoints and display them on the map
            foreach (SystemAdaptationDataSet.Waypoint Waypoint in SystemAdaptationDataSet.WaypointDataSet)
            {
                // Image properties
                GMapMarkerImage MyMarkerImage =
                    new GMapMarkerImage(new PointLatLng(Waypoint.WaypointPosition.GetLatLongDecimal().LatitudeDecimal, Waypoint.WaypointPosition.GetLatLongDecimal().LongitudeDecimal), WaypointImage);
                MyMarkerImage.ToolTipMode = MarkerTooltipMode.Never;

                System.Drawing.SolidBrush myBrush;
                myBrush = new System.Drawing.SolidBrush(WaypointDisplayAttribute.TextColor);
                WaypointMarker WPT_Marker = new WaypointMarker(new PointLatLng(Waypoint.WaypointPosition.GetLatLongDecimal().LatitudeDecimal, Waypoint.WaypointPosition.GetLatLongDecimal().LongitudeDecimal), Waypoint.WaypointName,
                   new Font(WaypointDisplayAttribute.TextFont, WaypointDisplayAttribute.TextSize, FontStyle.Regular, GraphicsUnit.Pixel), myBrush);

                // Load marker to overlay
                OverlayOut.Markers.Add(MyMarkerImage);
                OverlayOut.Markers.Add(WPT_Marker);
            }
        }

Usage Example

Пример #1
0
        public static void Build(ref GMapOverlay Overlay)
        {
            if (Properties.Settings.Default.Radars)
            {
                RadarDisplay.Build(ref Overlay);
            }

            if (Properties.Settings.Default.Waypoints)
            {
                WaypointDisplay.Build(ref Overlay);
            }

            if (Properties.Settings.Default.StateBorder)
            {
                StateBorderDisplay.Build(ref Overlay);
            }

            if (Properties.Settings.Default.Sectors)
            {
                SectorBorderDisplay.Build(ref Overlay);
            }

            if (Properties.Settings.Default.Runways)
            {
                RunwayBorderDisplay.Build(ref Overlay);
            }
        }
WaypointDisplay