public PrivateChatScreen(CommandClient cClient, IPAddress ip, string name, string initMsg) { InitializeComponent(); targetClient = cClient; targetIP = ip; targetName = name; Text += " With " + name; txtBox_PrivateMsg.Text = targetName + ": " + initMsg + Environment.NewLine; targetClient.received += new CommandReceivedEventHandler(privateCommandReceived); }
public LoginScreen(IPAddress ip, int port) { InitializeComponent(); canExit = false; CheckForIllegalCrossThreadCalls = false; client = new CommandClient(ip, port, "none"); client.received += new CommandReceivedEventHandler(CommandReceived); client.successed += new ConnectingSuccessedEventHandler(client_ConnectingSuccess); client.c_failed += new ConnectingFailedEventHandler(client_ConnectingFailed); }
public FormMain() { InitializeComponent(); chatList = new List <PrivateChatScreen>(); client = new CommandClient(IPAddress.Parse("0.0.0.0"), 8000, "None"); }