Пример #1
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Aircraft")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "GroundVehicle")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "LaunchVehicle")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Missile")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Satellite")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
     if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Ship")
     {
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
 }
Пример #2
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder menuBuilder)
 {
     //   if (m_root.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Scenario")
     //   {
     menuBuilder.AddMenuItem(MCommandText, MPluginTitle, MPluginDescription, _mPicture);
     //   }
 }
Пример #3
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder menuBuilder)
 {
     menuBuilder.AddMenuItem(
         "MyCompany.MySampleUiPlugin.MySecondCommand",
         "Example Menu Item 1",
         " Display a message box.",
         null);
 }
Пример #4
0
        public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
        {
            string className = CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName;

            if (className == "Satellite" || className == "Aircraft" || className == "Missile")
            {
                MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
            }
        }
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     if (m_integrate)
     {
         stdole.IPictureDisp picture;
         picture = (stdole.IPictureDisp)Microsoft.VisualBasic.Compatibility.VB6.Support.IconToIPicture(Resources.direction64);
         //Add a Menu Item
         MenuBuilder.AddMenuItem("AGI.BasicCSharpPlugin.MyFirstContextMenuCommand", "Directions", "Open a Custom user interface.", picture);
     }
 }
Пример #6
0
        public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
        {
            //the current Selected Object
            IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_psite.Selection[0].Path);

            if (oSelectedObject.ClassName.Equals("Satellite") | oSelectedObject.ClassName.Equals("Aircraft") | oSelectedObject.ClassName.Equals("GroundVehicle") | oSelectedObject.ClassName.Equals("LaunchVehicle") | oSelectedObject.ClassName.Equals("Ship") | oSelectedObject.ClassName.Equals("Missile"))
            {
                MenuBuilder.AddMenuItem("ExportUMT", "Export UMT File...", "Exports a UMT File", null);
            }
        }
Пример #7
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     //MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     //if (CommonData.StkRoot.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Scenario")
     //{
     //    IAgUiPluginMenuBuilder SubMenuBuilder = MenuBuilder.AddPopupMenu("Mouse Options");
     //    SubMenuBuilder.AddMenuItem(m_commandTextLocation, "Location", "Location", m_picture);
     //    SubMenuBuilder.AddMenuItem(m_commandTextObject, "Object", "Object", m_picture);
     //}
 }
Пример #8
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     if (m_integrate)
     {
         stdole.IPictureDisp picture;
         Assembly            currentAssembly = Assembly.GetExecutingAssembly();
         Image icon = Image.FromStream(currentAssembly.GetManifestResourceStream(m_imageResource));
         picture = OlePictureHelper.OlePictureFromImage(icon);
         //Add a Menu Item
         MenuBuilder.AddMenuItem(m_commandText, m_pluginTitle, m_pluginDescription, picture);
     }
 }
Пример #9
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     if (m_integrate)
     {
         stdole.IPictureDisp picture;
         string   imageResource   = "OrbitTunerUiPlugin.STK.ico";
         Assembly currentAssembly = Assembly.GetExecutingAssembly();
         Icon     icon            = new Icon(currentAssembly.GetManifestResourceStream(imageResource));
         picture = (stdole.IPictureDisp)Microsoft.VisualBasic.Compatibility.VB6.Support.IconToIPicture(icon);
         //Add a Menu Item
         MenuBuilder.AddMenuItem("AGI.BasicCSharpPlugin.MyFirstContextMenuCommand", "Orbit Tuner", "Open the Orbit Tuner custom user interface.", picture);
     }
 }
Пример #10
0
        public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
        {
            // Limit plugin context menu to scenario object only
            bool          isValidType            = true;
            List <string> supportedObjectClasses = new List <string>(new string[] { "SCENARIO" });
            IAgStkObject  stkobject;

            IAgUiPluginSelectedObjectCollection selectedobjects = m_psite.Selection;

            foreach (IAgUiPluginSelectedObject selectedobject in selectedobjects)
            {
                stkobject = m_root.GetObjectFromPath(selectedobject.Path);
                if (!supportedObjectClasses.Contains(stkobject.ClassName.ToUpperInvariant()))
                {
                    isValidType = false;
                }
            }

            if (isValidType)
            {
                MenuBuilder.AddMenuItem("HorizonsEphemImporter.OpenPlugin", "Horizons Importer", "JPL Horizons Ephemeris Importer", null);
            }
        }
Пример #11
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     MenuBuilder.AddMenuItem("AstrodynUi.MenuCommand", "Astrodyn UI", "An educational plugin for studying Astrodynamics", null);
 }
Пример #12
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
 }
Пример #13
0
 public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder)
 {
     throw new NotImplementedException();
 }