Inheritance: GMap.NET.WindowsForms.GMapMarker
Example #1
0
        private void SetLabelAttributes(ref GMapTargetandLabel Marker_In)
        {
            // Label Text Font and Size
            Marker_In.ModeA_CI_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.ModeA_CI_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.CALLSIGN_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.CALLSIGN_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.ModeC_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.ModeC_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.GSPD_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.GSPD_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.CFL_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
               FontStyle.Bold | FontStyle.Regular);
            Marker_In.CFL_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.A_HDG_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.A_HDG_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.A_ROC_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.A_ROC_BRUSH = new SolidBrush(LabelAttributes.TextColor);

            Marker_In.A_SPD_FONT = new Font(LabelAttributes.TextFont, LabelAttributes.TextSize,
            FontStyle.Bold | FontStyle.Regular);
            Marker_In.A_SPD_BRUSH = new SolidBrush(LabelAttributes.TextColor);
        }
Example #2
0
        /////////////////////////////////////////////////////////////////////////////////
        // This method builds the label text
        /// <summary>
        /// /////////////////////////////////////////////////////////////////////////////
        /// </summary>
        /// <param name="Target_In"></param>
        /// <returns></returns>
        private void BuildDynamicLabelText(DynamicDisplayBuilder.TargetType Target_Data, ref GMapTargetandLabel Label_Data)
        {
            string CoastIndicator;
            if (Target_Data.TrackTerminateTreshold > 1)
                CoastIndicator = " ↘";
            else
                CoastIndicator = "";

            Label_Data.ModeA_CI_STRING = Target_Data.ModeA + CoastIndicator;

            Label_Data.ModeC_STRING = ApplyCModeHisterysis(Target_Data.ModeC);

            if (Target_Data.ModeC_Previous_Cycle != null && Target_Data.ModeC != null && Target_Data.ModeC_Previous_Cycle != "")
            {
                try
                {
                    if (double.Parse(Target_Data.ModeC_Previous_Cycle) > double.Parse(Target_Data.ModeC))
                        Label_Data.ModeC_STRING = Label_Data.ModeC_STRING + "↓";
                    else if (double.Parse(Target_Data.ModeC_Previous_Cycle) < double.Parse(Target_Data.ModeC))
                        Label_Data.ModeC_STRING = Label_Data.ModeC_STRING + "↑";
                }
                catch
                {
                    Label_Data.ModeC_STRING = "---";
                }
            }

            if (Target_Data.ACID_Mode_S != null)
                Label_Data.CALLSIGN_STRING = Target_Data.ACID_Mode_S;

            Label_Data.MyTargetIndex = Target_Data.TrackNumber;

            // At the end move extended lable data to the marker, so it is ready for dynamic manipulation by the client
            Label_Data.Mode_S_Addr = Target_Data.Mode_S_Addr;
            Label_Data.TRK = Target_Data.TRK;
            Label_Data.DAP_HDG = Target_Data.DAP_HDG;
            Label_Data.CALC_HDG_STRING = Target_Data.CALC_HDG;
            Label_Data.IAS = Target_Data.IAS;
            Label_Data.MACH = Target_Data.MACH;
            Label_Data.TAS = Target_Data.TAS;
            Label_Data.CALC_GSPD_STRING = Target_Data.CALC_GSPD;
            Label_Data.DAP_GSPD = Target_Data.DAP_GSPD;
            Label_Data.Roll_Angle = Target_Data.Roll_Ang;
            Label_Data.SelectedAltitude_ShortTerm = Target_Data.SelectedAltitude_ShortTerm;
            Label_Data.SelectedAltitude_LongTerm = Target_Data.SelectedAltitude_LongTerm;
            Label_Data.Rate_Of_Climb = Target_Data.Rate_Of_Climb;
            Label_Data.Barometric_Setting = Target_Data.Barometric_Setting;

            // Set STCA parameters
            foreach (STCA_Target_Item STCA_Item in Target_Data.STCA_List)
                Label_Data.STCA_List.Add(STCA_Item);
        }
Example #3
0
 private void HandleExtendedLabel(GMapTargetandLabel MarkerData)
 {
     //////////////////////////////////////
     // First set title to Track ID
     ExtendedLabel.Text = MarkerData.ModeA_CI_STRING + "/" + MarkerData.CALLSIGN_STRING;
     // Now set the values
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.HDG, MarkerData.DAP_HDG);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.IAS, MarkerData.IAS);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.MACH, MarkerData.MACH);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.TAS, MarkerData.TAS);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.TRK, MarkerData.TRK);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.Roll_Angle, MarkerData.Roll_Angle);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.RateOfClimb, MarkerData.Rate_Of_Climb);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.Selected_Altitude, MarkerData.SelectedAltitude_ShortTerm);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.Selected_Altitude_F, MarkerData.SelectedAltitude_LongTerm);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.BaroSetting, MarkerData.Barometric_Setting);
     ExtendedLabel.SetDataValue(FrmExtendedLabel.DataItems.Mode_S_Addr, MarkerData.Mode_S_Addr);
 }