private void Form1_Load(object sender, EventArgs e) { print("Client connecting..."); if (null == msgController) { msgController = new MsgController(); } msgController.FormView = this; msgController.UserInfo = new UserInfo() { Nick = "Test" + new Random().Next() }; msgController.Connect(); }
private void btnStart_Click(object sender, EventArgs e) { startServer(); if (null == masterController) { masterController = new MsgController(); } masterController.FormView = this; masterController.UserInfo = new UserInfo("Master", true); masterController.Connect(); }