public void OnDisplayContextMenu(IAgUiPluginMenuBuilder menuBuilder) { // if (m_root.GetObjectFromPath(m_pSite.Selection[0].Path).ClassName == "Scenario") // { menuBuilder.AddMenuItem(MCommandText, MPluginTitle, MPluginDescription, _mPicture); // } }
public void OnDisplayContextMenu(IAgUiPluginMenuBuilder menuBuilder) { menuBuilder.AddMenuItem( "MyCompany.MySampleUiPlugin.MySecondCommand", "Example Menu Item 1", " Display a message box.", null); }
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); } }
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); } }
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); } }
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); } }
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); } }
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); // SubMenuBuilder.AddMenuItem(m_commandTextGlobe, "Globe", "Globe", m_picture); // SubMenuBuilder.AddMenuItem(m_commandTextScreen, "Screen", "Screen", m_picture); // SubMenuBuilder.AddMenuItem(m_commandTextNone, "None", "None", m_picture); //} }
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); } }
public void OnDisplayContextMenu(IAgUiPluginMenuBuilder MenuBuilder) { MenuBuilder.AddMenuItem("AstrodynUi.MenuCommand", "Astrodyn UI", "An educational plugin for studying Astrodynamics", null); }