예제 #1
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            site = PluginSite;
            IAgUiApplication AgUiApp = site.Application;

            root = AgUiApp.Personality2 as AgStkObjectRoot;
        }
예제 #2
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            // Setup and attach to STK
            m_psite = PluginSite;
            IAgUiApplication AgUiApp = m_psite.Application;

            m_root = AgUiApp.Personality2 as AgStkObjectRoot;
        }
예제 #3
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            m_pSite = PluginSite;
            //Get the AgStkObjectRoot
            IAgUiApplication AgUiApp = m_pSite.Application;

            m_root = AgUiApp.Personality2 as AgStkObjectRootClass;
        }
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            m_pSite = PluginSite;
            IAgUiApplication AgUiApp = m_pSite.Application;

            m_root = AgUiApp.Personality2 as AgStkObjectRoot;
            m_root.Isolate();
            m_root.UnitPreferences.ResetUnits();
        }
예제 #5
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            m_pSite = PluginSite;
            IAgUiApplication AgUiApp = m_pSite.Application;

            m_root = AgUiApp.Personality2 as IAgStkObjectRoot;
            m_root.Isolate();
            m_root.UnitPreferences.ResetUnits();
            ((AgStkObjectRoot)m_root).OnScenarioClose += new IAgStkObjectRootEvents_OnScenarioCloseEventHandler(m_root_OnScenarioClose);
        }
예제 #6
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            //Get the AgStkObjectRoot
            m_pSite = PluginSite;
            IAgUiApplication AgUiApp = m_pSite.Application;

            m_root = AgUiApp.Personality2 as AgStkObjectRootClass;
            m_root.Isolate();
            m_root.UnitPreferences.ResetUnits();

            CoverageClass.root = m_root;
        }
예제 #7
0
        public void OnStartup(IAgUiPluginSite PluginSite)
        {
            m_pSite = PluginSite;
            //Get the AgStkObjectRoot
            IAgUiApplication AgUiApp = m_pSite.Application;

            m_root = AgUiApp.Personality2 as AgStkObjectRoot;
            m_root.Isolate();
            m_root.UnitPreferences.ResetUnits();
            m_root.OnStkObjectAdded      += new IAgStkObjectRootEvents_OnStkObjectAddedEventHandler(UpdateListAdded);
            m_root.OnStkObjectChanged    += new IAgStkObjectRootEvents_OnStkObjectChangedEventHandler(UpdateListChanged);
            m_root.OnStkObjectRenamed    += new IAgStkObjectRootEvents_OnStkObjectRenamedEventHandler(UpdateListRenamed);
            m_root.OnStkObjectDeleted    += new IAgStkObjectRootEvents_OnStkObjectDeletedEventHandler(UpdateListDeleted);
            m_root.OnScenarioBeforeClose += new IAgStkObjectRootEvents_OnScenarioBeforeCloseEventHandler(ScenarioCloseEvent);

            STKHelper.StkRoot = m_root;
        }
예제 #8
0
        public void Initialize()
        {
            if (m_pSite != null)
            {
                Image menuImage = null;

                Assembly currentAssembly = Assembly.GetExecutingAssembly();
                menuImage = Image.FromStream(currentAssembly.GetManifestResourceStream(m_imageResource));
                m_picture = OlePictureHelper.OlePictureFromImage(menuImage);
                IAgUiApplication AgUiApp = m_pSite.Application;

                // Set STK Root object
                CommonData.StkRoot = (AgStkObjectRoot)AgUiApp.Personality2;

                // Read preference file
                AGI.STKUtil.IAgExecCmdResult cmdResult = CommonData.StkRoot.ExecuteCommand("GetDirectory / DefaultUser");
                string userPath = cmdResult[0].ToString();
                m_prefPath = Path.Combine(userPath, m_configPath);
                if (File.Exists(m_prefPath))
                {
                    using (StreamReader streamReader = new StreamReader(m_prefPath))
                    {
                        m_stringValue = streamReader.ReadLine();
                        m_doubleValue = Double.Parse(streamReader.ReadLine());
                        streamReader.Close();
                    }
                }
                else
                {
                    m_stringValue = "";
                    m_doubleValue = 0.0;
                }
            }
            else
            {
                MessageBox.Show("Error: Couldn't aquire STK Root Object");
            }
        }