void c_ConnectionStatusChanged(object sender, ConnectionStatusChangedEventArgs e) { if (e.Connected) { UpdateStatus("Connection Size = Connected!" + e.RemoteGUID.ToString()); } else { UpdateStatus("Connection Size = FAILED!"); } }
private void comm_ConnectionStatusChanged(object sender, ConnectionStatusChangedEventArgs e) { Console.Write("Connected = " + e.Connected); if (e.Connected && comm.UserRole == Communicator.ROLE.SERVER) { Players.Add(e.RemoteGUID.ToString("N"), new Player(Players.Count, e.RemoteGUID.ToString("N"))); myChat.NewMessage("System", Players[e.RemoteGUID.ToString("N")].PlayerName + (e.Connected ? " has connected." : " has disconnected")); } else { myChat.NewMessage("System", "You have " + (e.Connected ? " connected." : " been disconnected")); } }