static void Main(string[] args) { bot = new Bot(); bot.OnRawMessage+=new IrcEventHandler(bot_OnRawMessage); bot.ConnectAll(); new Thread(new ThreadStart(ReadCommand)).Start(); }
static void Main() { bot = new Bot(); Application.Run(new frmMain()); }
private void frmMain_Load(object sender, EventArgs e) { writer = new System.IO.StringWriter(); Console.SetOut(writer); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); FormClosing += new FormClosingEventHandler(frmMain_FormClosing); txtLog.TextChanged += new EventHandler(txtLog_TextChanged); txtMessage.KeyDown += new KeyEventHandler(txtMessage_KeyDown); bot = new Bot(); bot.OnRawMessage+=new IrcEventHandler(Bot_OnRawMessage); bot.ConnectAll(); thread = new System.Threading.Thread(new System.Threading.ThreadStart(Log)); thread.Start(); }