Exemplo n.º 1
0
    public bool Init(MainForm a_mainForm)
    {
      int port = 49001;

      m_mainForm = a_mainForm;
      
      m_outputWin = new OutputWin();

      m_outputWin.GetControl().Parent = m_mainForm.GetOutput();
      m_outputWin.GetControl().Dock = DockStyle.Fill;
      m_outputWin.SetLineLimit(20);

      InitScintilla();

      if (!m_network.Open(port))
      {
        return false;
      }

      m_outputWin.AddLogText(OutputWin.LogType.Info, "Listening on port '" + port.ToString() + "'");

      return true;
    }
Exemplo n.º 2
0
        public bool Init(MainForm a_mainForm)
        {
            int port = 49001;

            m_mainForm = a_mainForm;

            m_outputWin = new OutputWin();

            m_outputWin.GetControl().Parent = m_mainForm.GetOutput();
            m_outputWin.GetControl().Dock   = DockStyle.Fill;
            m_outputWin.SetLineLimit(20);

            InitScintilla();

            if (!m_network.Open(port))
            {
                return(false);
            }

            m_outputWin.AddLogText(OutputWin.LogType.Info, "Listening on port '" + port.ToString() + "'");

            return(true);
        }
Exemplo n.º 3
0
        public void OnTick(object a_sender, EventArgs a_eventArgs)
        {
            if (m_network.IsConnected)
            {
                m_state.m_isDebugging = true;

                // Process incomming net messages
                m_mainForm.SuspendLayout(); // Attempt to speed up UI which will be updated by incoming net messages
                m_debuggerSession.Update(m_debuggerRecInterface);
                m_mainForm.ResumeLayout();

                // Periodically grab the thread states
                const long POLL_MACHINE_RATE = 5000;                       // 5 second
                long       currentTimeMS     = DateTime.Now.Ticks / 10000; // Convert 100ns to MS
                long       deltaTime         = currentTimeMS - m_timeLastPollMachineStateMS;
                if (deltaTime >= POLL_MACHINE_RATE)
                {
                    //m_outputWin.AddLogText(OutputWin.LogType.Info, "poll" + deltaTime.ToString());
                    m_timeLastPollMachineStateMS = currentTimeMS;

                    // Poll for thread changes
                    m_debuggerSession.gmMachineGetThreadInfo();
                }
            }
            else if (m_state.m_isDebugging)
            {
                m_state.m_isDebugging = false;
            }

            m_mainForm.UpdateToolBar();

            if ((m_network != null) && (m_network.m_closeStatus == Network.CloseStatus.LostConnection))
            {
                m_network.ClearCloseStatus();
                m_outputWin.AddLogText(OutputWin.LogType.Info, "Lost connection");
            }
        }