Ejemplo n.º 1
0
 private void SensorGraphics_CheckedChanged(object sender, EventArgs e)
 {
     if (!_onStart)
     {
         IAgExecCmdResult result;
         result = CommonData.StkRoot.ExecuteCommand("ShowNames * Class Sensor");
         if (result[0] != "None")
         {
             string[] sensorArray = result[0].Split(null);
             foreach (var item in sensorArray)
             {
                 if (item != null && item != "")
                 {
                     string    path   = _library.SimplifiedObjectPath(item);
                     IAgSensor sensor = CommonData.StkRoot.GetObjectFromPath(path) as IAgSensor;
                     if (SensorGraphics.Checked)
                     {
                         sensor.Graphics.InheritFromScenario          = false;
                         sensor.Graphics.IsObjectGraphicsVisible      = true;
                         CommonData.Preferences.SensorGraphicsDisplay = true;
                     }
                     else
                     {
                         sensor.Graphics.InheritFromScenario          = false;
                         CommonData.Preferences.SensorGraphicsDisplay = false;
                         sensor.Graphics.IsObjectGraphicsVisible      = false;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        public static List <GroundLocation> PopulateGroundObjectList(string className)
        {
            List <GroundLocation> locations          = new List <GroundLocation>();
            StkObjectsLibrary     mStkObjectsLibrary = new StkObjectsLibrary();
            string           simpleName;
            string           classNameTemp;
            StringCollection objectNames = mStkObjectsLibrary.GetObjectPathListFromInstanceNamesXml(CommonData.StkRoot.AllInstanceNamesToXML(), "");

            foreach (string objectName in objectNames)
            {
                classNameTemp = mStkObjectsLibrary.ClassNameFromObjectPath(objectName);
                if (classNameTemp == className)
                {
                    GroundLocation current = new GroundLocation();
                    simpleName           = mStkObjectsLibrary.ObjectName(objectName);
                    current.LocationName = simpleName;
                    string simplePath = mStkObjectsLibrary.SimplifiedObjectPath(objectName);
                    current.SimplePath = simplePath;
                    List <double> location = GetGroundLocation(current.SimplePath);
                    current.Latitude  = location[0];
                    current.Longitude = location[1];
                    current.Altitude  = location[2];
                    locations.Add(current);
                }
            }
            return(locations);
        }
Ejemplo n.º 3
0
 void m_root_OnStkObjectDeleted(object sender)
 {
     string objectPath = sender.ToString();
     string simpleName = _mStkObjectsLibrary.SimplifiedObjectPath(objectPath);
     //cbStkObjects.Items.Remove(simpleName);
 }