Exemplo n.º 1
0
 public LinkToListForm()
 {
     InitializeComponent();
     m_stkObjectsLibrary = new StkObjectsLibrary();
     PopulateComboBox();
     IncrementStepValue.Enabled = false;
     CommonData.sectionList[CommonData.selectedArtic].linkedToStart = true;
 }
Exemplo n.º 2
0
        //Get all events in scenario
        public static List <IAgCrdn> GetAllEventInstances()
        {
            StkObjectsLibrary m_stkObjectsLibrary = new StkObjectsLibrary();
            List <IAgCrdn>    events = new List <IAgCrdn>();

            IAgScenario scenario = CommonData.StkRoot.CurrentScenario as IAgScenario;

            //Get all access events available in scenario
            Array accesses    = scenario.GetExistingAccesses();
            int   numAccesses = accesses.GetLength(0);

            for (int i = 0; i < numAccesses; i++)
            {
                string object1      = accesses.GetValue(i, 0).ToString();
                string shortobject1 = object1.Substring(object1.IndexOf('/') + 1);
                string object2      = accesses.GetValue(i, 1).ToString();
                string shortobject2 = object2.Substring(object2.IndexOf('/') + 1);

                IAgStkAccess      access       = scenario.GetAccessBetweenObjectsByPath(object1, object2);
                IAgCrdnEventGroup accessEvents = access.Vgt.Events;
                for (int j = 0; j < accessEvents.Count; j++)
                {
                    IAgCrdn currentEvent = (IAgCrdn)accessEvents[j];
                    events.Add(currentEvent);
                }
            }
            //Get all object events available in scenario
            string simpleName;
            string className;

            foreach (string path in CommonData.objectPaths)
            {
                int instanceNameStartPos = path.LastIndexOf("/") + 1;
                simpleName = path.Substring(instanceNameStartPos);
                className  = m_stkObjectsLibrary.ClassNameFromObjectPath(path);
                string       objectPath = className + "/" + simpleName;
                IAgStkObject obj        = null;
                try
                {
                    obj = CommonData.StkRoot.GetObjectFromPath(objectPath);
                    IAgCrdnEventGroup eventGroup = obj.Vgt.Events;
                    int eventCount = obj.Vgt.Events.Count;

                    for (int i = 0; i < eventCount; i++)
                    {
                        IAgCrdn currentEvent = (IAgCrdn)eventGroup[i];
                        events.Add(currentEvent);
                    }
                }
                catch (Exception)
                {
                }
            }
            return(events);
        }
Exemplo n.º 3
0
        public void SetSite(IAgUiPluginEmbeddedControlSite Site)
        {
            m_pEmbeddedControlSite = Site;
            m_uiPlugin             = m_pEmbeddedControlSite.Plugin as Setup;
            m_stkObjectsLibrary    = new StkObjectsLibrary();

            //EXAMPLE: Hooking to STK Exents
            CommonData.StkRoot.OnStkObjectAdded   += new IAgStkObjectRootEvents_OnStkObjectAddedEventHandler(m_root_OnStkObjectAdded);
            CommonData.StkRoot.OnStkObjectDeleted += new IAgStkObjectRootEvents_OnStkObjectDeletedEventHandler(m_root_OnStkObjectDeleted);
            //EXAMPLE: Using preference value
            //m_uiPlugin.DoubleValue;

            //EXAMPLE: Populate combo box with STK Objects
            PopulateComboBox();
            AttitudeCoordFrame.Enabled = false;
            MainBody.Enabled           = false;
        }
Exemplo n.º 4
0
 public LinkToTimeForm()
 {
     InitializeComponent();
     m_stkObjectsLibrary = new StkObjectsLibrary();
     PopulateComboBox();
 }