我有一个按钮,如果我点击它,它会在游戏服务器上检索玩家信息。我需要想办法在网格中显示它。
当我做一个 Console.Write(sendRConCommand("players"))
这将输出到我的控制台:
Players on server:
[#] [IP Address]:[Port] [Ping] [GUID] [Name]
--------------------------------------------------
0 XXX.XXX.XXX.XXX:XXXX 46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) [FF]Otto
1 XXX.XXX.XXX.XXX:XXXX 109 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) [BBC] Emma Watson
2 XXX.XXX.XXX.XXX:XXXX 46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) [FF]Miikka
3 XXX.XXX.XXX.XXX:XXXX 46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Bops
4 XXX.XXX.XXX.XXX:XXXX 32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) [BBC] Wesley Snipes
5 XXX.XXX.XXX.XXX:XXXX 31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Pierre
6 XXX.XXX.XXX.XXX:XXXX 46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) bertrand
7 XXX.XXX.XXX.XXX:XXXX -1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) SIGGI (Lobby)
8 XXX.XXX.XXX.XXX:XXXX 47 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Min (Lobby)
9 XXX.XXX.XXX.XXX:XXXX 32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Frostpwnz
10 XXX.XXX.XXX.XXX:XXXX 31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Zulu BASSA (Lobby)
11 XXX.XXX.XXX.XXX:XXXX 31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) Zardock (Lobby)
14 XXX.XXX.XXX.XXX:XXXX 63 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(OK) plbmas
(13 players in total)
我需要弄清楚如何在网格中显示这些信息,以及显示列标题。
提前致谢 :)