Ejemplo n.º 1
0
 private void PopulateDisplayReports(ComboBox box, ComboBox ddObject)
 {
     if (ddObject.SelectedIndex != -1)
     {
         string className = SmartViewFunctions.GetClassName(ddObject.Text);
         IAgVODataDisplayCollection ddCollection = null;
         if (className == "Satellite")
         {
             IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgSatellite;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Aircraft")
         {
             IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgAircraft;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Facility")
         {
             IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgFacility;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Missile")
         {
             IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgMissile;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "GroundVehicle")
         {
             IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgGroundVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "LaunchVehicle")
         {
             IAgLaunchVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgLaunchVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Place")
         {
             IAgPlace myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgPlace;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Target")
         {
             IAgTarget myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + ddObject.Text) as IAgTarget;
             ddCollection = myObject.VO.DataDisplays;
         }
         box.Items.Clear();
         Array reportNames = ddCollection.AvailableData;
         foreach (var name in reportNames)
         {
             box.Items.Add(name);
         }
         box.SelectedIndex = 0;
     }
 }
 private void TTDisplayObject_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (TTDisplayObject.SelectedIndex != -1)
     {
         TTDisplayReport.Items.Clear();
         if (TTDisplayObject.SelectedIndex == 0)
         {
             TTDisplayLocation.Enabled = true;
             TTDisplayReport.Items.Add("LLA Position");
             TTDisplayReport.Items.Add("Classical Orbital Elements");
             TTDisplayReport.Items.Add("Inertial Position Velocity");
             TTDisplayReport.Items.Add("Fixed Position Velocity");
         }
         else if (TTDisplayObject.SelectedIndex == 1)
         {
             TTDisplayLocation.Enabled = false;
             TTDisplayReport.Items.Add("RIC");
             TTDisplayReport.Items.Add("LLA Position");
             TTDisplayReport.Items.Add("Classical Orbital Elements");
             TTDisplayReport.Items.Add("Inertial Position Velocity");
             TTDisplayReport.Items.Add("Fixed Position Velocity");
         }
         else
         {
             TTDisplayLocation.Enabled = true;
             string className = SmartViewFunctions.GetClassName(TTDisplayObject.Text);
             IAgVODataDisplayCollection ddCollection = null;
             if (className == "Satellite")
             {
                 IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + TTDisplayObject.Text) as IAgSatellite;
                 ddCollection = myObject.VO.DataDisplay;
             }
             Array reportNames = ddCollection.AvailableData;
             foreach (var name in reportNames)
             {
                 TTDisplayReport.Items.Add(name);
                 if (name.ToString() == CommonData.SavedViewList[CommonData.SelectedIndex].TtDataDisplayReportName)
                 {
                     TTDisplayReport.SelectedIndex = TTDisplayReport.Items.Count - 1;
                 }
             }
         }
         if (TTDisplayReport.SelectedIndex == -1)
         {
             TTDisplayReport.SelectedIndex = 0;
         }
     }
 }
Ejemplo n.º 3
0
 private void DisplayObject_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DisplayObject.SelectedIndex != -1)
     {
         string className = SmartViewFunctions.GetClassName(DisplayObject.Text);
         IAgVODataDisplayCollection ddCollection = null;
         if (className == "Satellite")
         {
             IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgSatellite;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Aircraft")
         {
             IAgAircraft myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgAircraft;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "Facility")
         {
             IAgFacility myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgFacility;
             ddCollection = myObject.VO.DataDisplays;
         }
         else if (className == "Missile")
         {
             IAgMissile myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgMissile;
             ddCollection = myObject.VO.DataDisplay;
         }
         else if (className == "GroundVehicle")
         {
             IAgGroundVehicle myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + DisplayObject.Text) as IAgGroundVehicle;
             ddCollection = myObject.VO.DataDisplay;
         }
         DisplayReport.Items.Clear();
         Array reportNames = ddCollection.AvailableData;
         foreach (var name in reportNames)
         {
             DisplayReport.Items.Add(name);
             if (name.ToString() == CommonData.SavedViewList[CommonData.SelectedIndex].DataDisplayReportName)
             {
                 DisplayReport.SelectedIndex = DisplayReport.Items.Count - 1;
             }
         }
         if (DisplayReport.SelectedIndex == -1)
         {
             DisplayReport.SelectedIndex = 0;
         }
     }
 }
Ejemplo n.º 4
0
 private void GEODisplayObject_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (GEODisplayObject.SelectedIndex != -1)
     {
         string className = SmartViewFunctions.GetClassName(GEODisplayObject.Text);
         IAgVODataDisplayCollection ddCollection = null;
         IAgSatellite myObject = CommonData.StkRoot.GetObjectFromPath(className + "/" + GEODisplayObject.Text) as IAgSatellite;
         ddCollection = myObject.VO.DataDisplay;
         Array reportNames = ddCollection.AvailableData;
         foreach (var name in reportNames)
         {
             GEODisplayReport.Items.Add(name);
             if (name.ToString() == CommonData.SavedViewList[CommonData.SelectedIndex].GeoDataDisplayReportName)
             {
                 GEODisplayReport.SelectedIndex = GEODisplayReport.Items.Count - 1;
             }
         }
         if (GEODisplayReport.SelectedIndex == -1)
         {
             GEODisplayReport.SelectedIndex = 0;
         }
     }
 }