void IAgUiPluginCommandTarget.Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     if (string.Compare(CommandName, "AGI.SensorBoresightViewPlugin.SensorBoresightCommand", true) == 0)
     {
         OpenUserControl();
     }
 }
Пример #2
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     if (string.Compare(CommandName, "HorizonsEphemImporter.OpenPlugin", true) == 0)
     {
         OpenUserInterface();
     }
 }
Пример #3
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, m_commandText, true) == 0)
     {
         m_progress = TrackCancel;
         OpenUserInterface();
     }
     //if (string.Compare(CommandName, m_commandTextGlobe, true) == 0)
     //{
     //    m_globeEventType = GlobeEventType.Globe;
     //}
     //if (string.Compare(CommandName, m_commandTextLocation, true) == 0)
     //{
     //    m_globeEventType = GlobeEventType.Location;
     //}
     //if (string.Compare(CommandName, m_commandTextObject, true) == 0)
     //{
     //    m_globeEventType = GlobeEventType.Object;
     //}
     //if (string.Compare(CommandName, m_commandTextScreen, true) == 0)
     //{
     //    m_globeEventType = GlobeEventType.Screen;
     //}
     //if (string.Compare(CommandName, m_commandTextNone, true) == 0)
     //{
     //    m_globeEventType = GlobeEventType.None;
     //}
 }
Пример #4
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, "Enable Model Size Update", true) == 0)
     {
         if (m_updater == null)
         {
             ScaleFactorForm setScale = new ScaleFactorForm();
             setScale.ShowDialog();
             if (setScale.accepted)
             {
                 m_updater = new ModelUpdateClass(m_root)
                 {
                     scaleFactor = setScale.scaleFactor
                 };
                 m_updater.updateModelSize(((IAgAnimation)m_root).CurrentTime);
             }
         }
         else
         {
             m_updater.DisableModelUpdate();
             m_updater = null;
         }
     }
 }
Пример #5
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, m_commandText, true) == 0)
     {
         m_progress = TrackCancel;
         OpenUserInterface();
     }
 }
Пример #6
0
 public void Exec(string commandName, IAgProgressTrackCancel trackCancel, IAgUiPluginCommandParameters parameters)
 {
     //Controls what a command does
     if (string.Compare(commandName, MCommandText, true) == 0)
     {
         _mProgress = trackCancel;
         OpenUserInterface();
     }
 }
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, "AGI.BasicCSharpPlugin.MyFirstCommand", true) == 0 || string.Compare(CommandName, "AGI.BasicCSharpPlugin.MyFirstContextMenuCommand", true) == 0)
     {
         m_progress = TrackCancel;
         OpenUserInterface();
     }
 }
Пример #8
0
 public void Exec(string commandName, IAgProgressTrackCancel trackCancel, IAgUiPluginCommandParameters parameters)
 {
     if (string.Compare(commandName, "MyCompany.MySampleUiPlugin.MyFirstCommand", StringComparison.OrdinalIgnoreCase) == 0)
     {
         OpenUserInterface();
     }
     else if (string.Compare(commandName, "MyCompany.MySampleUiPlugin.MySecondCommand", StringComparison.OrdinalIgnoreCase) == 0)
     {
         OpenUserInterface();
     }
 }
Пример #9
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     if (string.Compare(CommandName, "AstrodynUi.MenuCommand", true) == 0)
     {
         try
         {
             OpenUserInterface();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
Пример #10
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, "UpdateStaticContours", true) == 0)
     {
         CoverageClass.AutoContour(m_pSite.Selection[0].Path, "Static");
     }
     if (string.Compare(CommandName, "UpdateAnimationContours", true) == 0)
     {
         CoverageClass.AutoContour(m_pSite.Selection[0].Path, "Animation");
     }
     if (string.Compare(CommandName, "ReportGridStats", true) == 0)
     {
         CoverageClass.GenerateGridStatsReport(m_pSite.Selection[0].Path);
     }
 }
Пример #11
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Command Name from Right-click Menu
     if (string.Compare(CommandName, "ExportUMT", true) == 0)
     {
         //Launch the Custom User Interface
         try
         {
             ExportUMTFile();
             MessageBox.Show("Create successfully created.", "File Creation Successful", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         catch (Exception ex)
         {
             MessageBox.Show("Could not create file.  " + ex.Message, "Error Creating File", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #12
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     if (string.Compare(CommandName, "Valispace.UIPlugin.OpenUICommand", true) == 0)
     {
         if (WPFLogin.valispace != null)
         {
             OpenUserInterface();
         }
         else
         {
             MessageBox.Show("Please Login to Valispace first using the 'Valispace Login' button");
         }
     }
     else if (string.Compare(CommandName, "Valispace.UIPlugin.LoginCommand", true) == 0)
     {
         OpenLoginUI();
     }
 }
Пример #13
0
        public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
        {
            //Controls what a command does
            if (string.Compare(CommandName, "AGI.PlanetsToggleCSharpPlugin.SetPlanetView", true) == 0)
            {
                if (planetsShown)
                {
                    setViewCameraPath();
                }
                else
                {
                    m_root.ExecuteCommand("VO * View Home");
                }
            }
            if (string.Compare(CommandName, "AGI.PlanetsToggleCSharpPlugin.PlanetsToggle", true) == 0)
            {
                if (planetsShown)
                {
                    m_root.ExecuteCommand("Window3D * ViewVolume MaxVisibleDist 1e11");
                    foreach (IAgStkObject planetObj in m_root.CurrentScenario.Children.GetElements(AgESTKObjectType.ePlanet))
                    {
                        planetObj.Unload();
                    }
                    planetsShown = false;
                }
                else
                {
                    m_root.ExecuteCommand("Graphics * GlobalAttributes ShowPlanetOrbits On ShowPlanetCbiPos On ShowPlanetCbiLabel On ShowPlanetGroundPos Off ShowPlanetGroundLabel Off");

                    foreach (string planet in planets)
                    {
                        createPlanet(planet);
                    }
                    m_root.ExecuteCommand("Window3D * ViewVolume MaxVisibleDist 1e14");
                    //m_root.ExecuteCommand("VO * Celestial Stars ShowTx On File \"" + @"C:\Program Files (x86)\AGI\Imagery\AGI Celestial Imagery\mwpan2.ctm" + "\"");

                    planetsShown = true;
                }
            }
        }
Пример #14
0
 public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
 {
     //Controls what a command does
     if (string.Compare(CommandName, m_commandTextLoadData, true) == 0)
     {
         m_progress = TrackCancel;
         OpenLoadDataUserInterface();
     }
     if (string.Compare(CommandName, m_commandTextCreateTracks, true) == 0)
     {
         m_progress = TrackCancel;
         OpenCreateTracksUserInterface();
     }
     if (string.Compare(CommandName, m_commandTextTrackComparison, true) == 0)
     {
         m_progress = TrackCancel;
         OpenTrackComparisonUserInterface();
     }
     if (string.Compare(CommandName, m_commandTextTestConnect, true) == 0)
     {
         m_progress = TrackCancel;
         OpenTestConnectUserInterface();
     }
 }
Пример #15
0
        public void Exec(string CommandName, IAgProgressTrackCancel TrackCancel,
                         IAgUiPluginCommandParameters Parameters)
        {
            if (string.Compare(CommandName, "EnterEditMode", true) == 0)
            {
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);

                string command = "Window3d * InpDevMode Mode Edit Path ";
                string objPath = oSelectedObject.ClassName + "/" + oSelectedObject.InstanceName;
                m_root.ExecuteCommand(command + objPath);
                //To apply editing for current object, and turn off edit mode:
                //Window3d * InpDevMode Mode EditOK
            }

            if (string.Compare(CommandName, "RasterSearch.LaunchInterface", true) == 0)
            {
                m_progress = TrackCancel;
                OpenRasterUserInterface();
            }

            if (string.Compare(CommandName, "UpdateVelocity", true) == 0)
            {
                GreatArcUpdate   updater        = new GreatArcUpdate(m_root);
                GreatArcUpdateUI changeVelocity = new GreatArcUpdateUI("Speed");
                changeVelocity.ShowDialog();
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);
                updater.UpdateWaypoint(oSelectedObject, GreatArcUpdate.WaypointProperty.Speed,
                                       changeVelocity.WaypointParameter, changeVelocity.ParameterUnits);
            }

            if (string.Compare(CommandName, "UpdateAltitude", true) == 0)
            {
                GreatArcUpdate   updater        = new GreatArcUpdate(m_root);
                GreatArcUpdateUI changeAltitude = new GreatArcUpdateUI("Altitude");
                changeAltitude.ShowDialog();
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);
                updater.UpdateWaypoint(oSelectedObject, GreatArcUpdate.WaypointProperty.Altitude,
                                       changeAltitude.WaypointParameter, changeAltitude.ParameterUnits);
            }

            if (string.Compare(CommandName, "UpdateTurnRadius", true) == 0)
            {
                GreatArcUpdate   updater          = new GreatArcUpdate(m_root);
                GreatArcUpdateUI changeTurnRadius = new GreatArcUpdateUI("TurnRadius");
                changeTurnRadius.ShowDialog();
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);
                updater.UpdateWaypoint(oSelectedObject, GreatArcUpdate.WaypointProperty.TurnRadius,
                                       changeTurnRadius.WaypointParameter, changeTurnRadius.ParameterUnits);
            }

            if (string.Compare(CommandName, "ShiftLatitude", true) == 0)
            {
                GreatArcUpdate   updater  = new GreatArcUpdate(m_root);
                GreatArcUpdateUI shiftLat = new GreatArcUpdateUI("Latitude");
                shiftLat.ShowDialog();
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);
                updater.UpdateWaypoint(oSelectedObject, GreatArcUpdate.WaypointProperty.Latitude,
                                       shiftLat.WaypointParameter, shiftLat.ParameterUnits);
            }

            if (string.Compare(CommandName, "ShiftLongitude", true) == 0)
            {
                GreatArcUpdate   updater  = new GreatArcUpdate(m_root);
                GreatArcUpdateUI shiftLon = new GreatArcUpdateUI("Longitude");
                shiftLon.ShowDialog();
                IAgStkObject oSelectedObject = m_root.GetObjectFromPath(m_pSite.Selection[0].Path);
                updater.UpdateWaypoint(oSelectedObject, GreatArcUpdate.WaypointProperty.Longitude,
                                       shiftLon.WaypointParameter, shiftLon.ParameterUnits);
            }
        }