Exemplo n.º 1
0
        public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind, IAgUiPluginMenuBuilder2 MenuBuilder)
        {
            string enabled = "Enable";

            //Insert a Menu Item
            if (m_updater != null)
            {
                enabled = "Disable";
            }
            if (MenuTitle.Contains("Scenario"))
            {
                MenuBuilder.InsertMenuItem(1, "Enable Model Size Update", enabled + " Model Size Update", enabled + " Model Size Update", null);
            }

            if (MenuBarKind == AgEUiPluginMenuBarKind.eUiPluginMenuBarContextMenu)
            {
                //the STK Object Root
                AgStkObjectRoot root = (AgStkObjectRoot)m_pSite.Application.Personality2;
                //the current Selected Object
                IAgStkObject oSelectedObject = root.GetObjectFromPath(m_pSite.Selection[0].Path);

                //Only show menu items for the Scenario or Satellite object
                if (oSelectedObject.ClassName.Equals("Scenario"))
                {
                    MenuBuilder.InsertMenuItem(5, "Enable Model Size Update", enabled + " Model Size Update", enabled + " Model Size Update", null);
                }
            }
        }
Exemplo n.º 2
0
 public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind, IAgUiPluginMenuBuilder2 MenuBuilder)
 {
     if (MenuTitle.Contains("Satellite"))
     {
         //Insert a Menu Item
         MenuBuilder.InsertMenuItem(0, m_commandText, m_pluginTitle, m_pluginDescription, m_picture);
     }
 }
Exemplo n.º 3
0
 public void OnDisplayMenu(string menuTitle, AgEUiPluginMenuBarKind menuBarKind, IAgUiPluginMenuBuilder2 menuBuilder)
 {
     if (menuTitle.Contains("Scenario"))
     {
         //Insert a Menu Item
         menuBuilder.InsertMenuItem(0, MCommandText, MPluginTitle, MPluginDescription, _mPicture);
     }
 }
Exemplo n.º 4
0
        public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind, IAgUiPluginMenuBuilder2 MenuBuilder)
        {
            if (MenuTitle.Contains("FigureOfMerit"))
            {
                //Insert a Menu Item
                MenuBuilder.InsertMenuItem(1, "ReportGridStats", "Generate Grid Stats Report", "Generate Grid Stats Report", null);
                MenuBuilder.InsertMenuItem(1, "UpdateStaticContours", "Auto Update Static Contours", "FOM Graphics Auto Update", null);
                MenuBuilder.InsertMenuItem(1, "UpdateAnimationContours", "Auto Update Animation Contours", "FOM Graphics Auto Update", null);
            }

            if (MenuBarKind == AgEUiPluginMenuBarKind.eUiPluginMenuBarContextMenu)
            {
                //the STK Object Root
                AgStkObjectRoot root = (AgStkObjectRoot)m_pSite.Application.Personality2;
                //the current Selected Object
                IAgStkObject oSelectedObject = root.GetObjectFromPath(m_pSite.Selection[0].Path);

                //Only show menu items for the Scenario or Satellite object
                if (oSelectedObject.ClassName.Equals("FigureOfMerit"))
                {
                    MenuBuilder.InsertMenuItem(5, "ReportGridStats", "Report Grid Stats", "Report Grid Stats", null);
                    MenuBuilder.InsertMenuItem(5, "UpdateStaticContours", "Auto Update Static Contours", "FOM Graphics Auto Update", null);
                    MenuBuilder.InsertMenuItem(5, "UpdateAnimationContours", "Auto Update Animation Contours", "FOM Graphics Auto Update", null);
                }
            }
        }
        public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind,
                                  IAgUiPluginMenuBuilder2 MenuBuilder)
        {
            if (MenuBarKind == AgEUiPluginMenuBarKind.eUiPluginMenuBarContextMenu)
            {
                //the STK Object Root
                AgStkObjectRoot root = (AgStkObjectRoot)m_pSite.Application.Personality2;
                //the current Selected Object
                oSelectedObject = root.GetObjectFromPath(m_pSite.Selection[0].Path);

                //Only show menu items for the Scenario or Satellite object
                if (oSelectedObject.ClassName.Equals("Sensor"))
                {
                    stdole.IPictureDisp boresightPic = (stdole.IPictureDisp)Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture(
                        Properties.Resources.boresight);

                    MenuBuilder.InsertMenuItem(3, "AGI.SensorBoresightViewPlugin.SensorBoresightCommand",
                                               "Create Sensor View 3D Window",
                                               "Create a new 3D Window aligned with the sensor boresight", boresightPic);
                }
            }
        }
Exemplo n.º 6
0
        public void OnDisplayMenu(string MenuTitle, AgEUiPluginMenuBarKind MenuBarKind,
                                  IAgUiPluginMenuBuilder2 MenuBuilder)
        {
            if (MenuTitle.Contains("Insert"))
            {
                //Add a Menu Item to the Insert menu
                stdole.IPictureDisp picture1;
                picture1 = (stdole.IPictureDisp)Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture(Agi.Ui.GreatArc.Stk12.Properties.Resources.acRoute64);
                MenuBuilder.InsertMenuItem(4,
                                           "RasterSearch.LaunchInterface",
                                           "Aircraft from Search Pattern...",
                                           "Define an Aircraft based on search criteria",
                                           picture1);
            }

            if (MenuBarKind == AgEUiPluginMenuBarKind.eUiPluginMenuBarContextMenu)
            {
                //the STK Object Root
                AgStkObjectRoot root = (AgStkObjectRoot)m_pSite.Application.Personality2;
                //the current Selected Object
                IAgStkObject oSelectedObject = root.GetObjectFromPath(m_pSite.Selection[0].Path);

                //Only show menu items for the Scenario or Satellite object
                if (oSelectedObject.ClassName.Equals("Aircraft") ||
                    oSelectedObject.ClassName.Equals("GroundVehicle") ||
                    oSelectedObject.ClassName.Equals("Ship"))
                {
                    MenuBuilder.InsertMenuItem(3, "UpdateVelocity", "Update Velocity", "Update Velocity", null);
                    MenuBuilder.InsertMenuItem(4, "UpdateAltitude", "Update Altitude", "Update Altitude", null);
                    MenuBuilder.InsertMenuItem(5, "UpdateTurnRadius", "Update Turn Radius", "Update Turn Radius", null);
                    MenuBuilder.InsertMenuItem(6, "EnterEditMode", "Enter 3D Edit Mode", "Enter 3D Edit Mode", null);
                    MenuBuilder.InsertSeparator(6);
                    MenuBuilder.InsertSeparator(3);
                }
                else if (oSelectedObject.ClassName.Equals("Place") ||
                         oSelectedObject.ClassName.Equals("Facility") ||
                         oSelectedObject.ClassName.Equals("Target") ||
                         oSelectedObject.ClassName.Equals("AreaTarget") ||
                         oSelectedObject.ClassName.Equals("LineTarget"))
                {
                    MenuBuilder.InsertMenuItem(3, "EnterEditMode", "Enter 3D Edit Mode", "Enter 3D Edit Mode", null);
                    MenuBuilder.InsertSeparator(3);
                }
            }

            if (MenuTitle.Contains("Ship") ||
                MenuTitle.Contains("GroundVehicle") ||
                MenuTitle.Contains("Aircraft"))
            {
                MenuBuilder.InsertMenuItem(0, "UpdateVelocity", "Update Velocity", "Update Velocity", null);
                MenuBuilder.InsertMenuItem(1, "UpdateAltitude", "Update Altitude", "Update Altitude", null);
                MenuBuilder.InsertMenuItem(2, "UpdateTurnRadius", "Update Turn Radius", "Update Turn Radius", null);
                MenuBuilder.InsertMenuItem(3, "ShiftLatitude", "Shift in Latitude", "Shift in Latitude", null);
                MenuBuilder.InsertMenuItem(4, "ShiftLongitude", "Shift in Longitude", "Shift in Longitude", null);
                MenuBuilder.InsertSeparator(5);
            }
        }