Example #1
0
        private void FormCPU_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.F3:                  // reset
                if (m_spectrum.IsRunning)
                {
                    break;
                }
                m_spectrum.DoReset();
                UpdateCPU(true);
                break;

            case Keys.F7:                  // StepInto
                if (m_spectrum.IsRunning)
                {
                    break;
                }
                try
                {
                    m_spectrum.DoStepInto();
                }
                catch (Exception ex)
                {
                    Logger.Error(ex);
                    Locator.Resolve <IUserMessage>().ErrorDetails(ex);
                }
                UpdateCPU(true);
                break;

            case Keys.F8:                  // StepOver
                if (m_spectrum.IsRunning)
                {
                    break;
                }
                try
                {
                    m_spectrum.DoStepOver();
                }
                catch (Exception ex)
                {
                    Logger.Error(ex);
                    Locator.Resolve <IUserMessage>().ErrorDetails(ex);
                }
                UpdateCPU(true);
                break;

            case Keys.F9:                  // Run
                m_spectrum.DoRun();
                UpdateCPU(false);
                break;

            case Keys.F5:                  // Stop
                m_spectrum.DoStop();
                UpdateCPU(true);
                break;
            }
        }
Example #2
0
        private void FormCPU_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.F3:
                if (!m_spectrum.IsRunning)
                {
                    m_spectrum.DoReset();
                    UpdateCPU(true);
                    return;
                }
                return;

            case Keys.F4:
            case Keys.F6:
                break;

            case Keys.F5:
                m_spectrum.DoStop();
                UpdateCPU(true);
                break;

            case Keys.F7:
                if (!m_spectrum.IsRunning)
                {
                    try
                    {
                        m_spectrum.DoStepInto();
                    }
                    catch (Exception exception)
                    {
                        Logger.Error(exception);
                        Locator.Resolve <IUserMessage>().ErrorDetails(exception);
                    }
                    UpdateCPU(true);
                    return;
                }
                return;

            case Keys.F8:
                if (!m_spectrum.IsRunning)
                {
                    try
                    {
                        m_spectrum.DoStepOver();
                    }
                    catch (Exception exception2)
                    {
                        Logger.Error(exception2);
                        Locator.Resolve <IUserMessage>().ErrorDetails(exception2);
                    }
                    UpdateCPU(true);
                    return;
                }
                return;

            case Keys.F9:
                m_spectrum.DoRun();
                UpdateCPU(false);
                return;

            case Keys.F10:
                sprint_ula.UpdateFrame();
                return;

            default:
                return;
            }
        }