AGS.Editor.Components.BuildCommandsComponent.CommandClick C# (CSharp) Method

CommandClick() public method

public CommandClick ( string controlID ) : void
controlID string
return void
        public override void CommandClick(string controlID)
        {
            if ((controlID == RUN_COMMAND) &&
                (!_agsEditor.Debugger.CanUseDebugger))
            {
                controlID = TEST_GAME_COMMAND;
            }

            if (controlID == RUN_COMMAND)
            {
                _guiController.ShowCuppit("When using this Run command, the game will always run in a window. If you want to play full-screen, use the Run Without Debugger option.", "Test full screen warning", true);

                if (_debuggerState == DebugState.NotRunning)
                {
                    TestGame(true);
                }
                else
                {
                    _agsEditor.Debugger.Resume();
                }
            }
            else if (controlID == STEP_INTO_COMMAND)
            {
                _agsEditor.Debugger.StepInto();
            }
            else if (controlID == STOP_COMMAND)
            {
                _agsEditor.Debugger.StopDebugging();
            }
            else if (controlID == PAUSE_COMMAND)
            {
                _agsEditor.Debugger.PauseExecution();
            }
            else if (controlID == COMPILE_GAME_COMMAND)
            {
                CompileGame(false);
            }
            else if (controlID == REBUILD_GAME_COMMAND)
            {
                CompileGame(true);
            }
            else if (controlID == SETUP_GAME_COMMAND)
            {
                try
                {
                    _agsEditor.Tasks.RunGameSetup();
                }
                catch (FileNotFoundException ex)
                {
                    _guiController.ShowMessage(ex.Message, MessageBoxIcon.Warning);
                }
            }
            else if (controlID == TEST_GAME_COMMAND)
            {
                TestGame(false);
            }
        }