void TelnetEvent(Telnet.TelnetCodes code, Telnet.TelnetOpts opt) { m_baseServicesDispatcher.DispatchTelnetEvent(code, opt); if (code == Telnet.TelnetCodes.WILL && opt == Telnet.TelnetOpts.TELOPT_ECHO) { m_mainWindow.PromptTextBox.PromptPassword = true; } else if (code == Telnet.TelnetCodes.WONT && opt == Telnet.TelnetOpts.TELOPT_ECHO) { m_mainWindow.PromptTextBox.PromptPassword = false; } }
public void DispatchTelnetEvent(Telnet.TelnetCodes code, Telnet.TelnetOpts opt) { if (TelnetEvent == null) { return; } try { TelnetEvent(code, opt); } catch (Exception e) { ChiConsole.WriteError("Error calling telnet handler", e); } }
// Transfers control to MainForm's thread void _TelnetEvent(Telnet.TelnetCodes code, Telnet.TelnetOpts opt) { m_mainWindow.BeginInvoke(new Telnet.TelnetDelegate(TelnetEvent), new object[] { code, opt }); }
// Transfers control to main thread void _TelnetEvent(Telnet.TelnetCodes code, Telnet.TelnetOpts opt) { m_synchronizedInvoke.BeginInvoke(new Telnet.TelnetDelegate(TelnetEvent), new object[] { code, opt }); }