Hello,
Im creating a TS3 server admin tool. And Im having a Problem adding items to the DAtagrid View.
Ive got like 8 Columns and I want to add this data to the correct Column But IDK What Im Doing Wrong
- #
- Server ID
- Server Port
- Server Status
- Clients
- Slots
- Server Name
Dim ServerList As ListResponse(Of ServerListItem) = queryRunner.GetServerList(includeAll:=True)
' If Their Is An Error With The Server Listing
If ServerList.IsErroneous Then
' Then, Display A MessageBox With The Error Number And The Error Message Associated To This Number
MessageBox.Show((ServerList.ErrorId + " : " + ServerList.ErrorMessage & vbCr & vbLf) + ServerList.ResponseText)
Else
For Each item As ServerListItem In ServerList
DataGridView1.Rows.Add(item.ServerMachineId)
DataGridView1.Rows.Add(item.ServerId)
DataGridView1.Rows.Add(item.ServerPort)
DataGridView1.Rows.Add(item.ServerStatus)
DataGridView1.Rows.Add(item.ServerNumberOfClientsOnline)
DataGridView1.Rows.Add(item.ServerMaximumClientsAllowed)
DataGridView1.Rows.Add(item.ServerName)
queryRunner.SelectVirtualServerById(item.ServerId)
' Get The Server Infos Of The Current Selected Server In The List
' And Put The Result In ServerInfos Object Of "ServerInfoResponse Type
Dim ServerInfos As ServerInfoResponse = queryRunner.GetServerInfo()
' If Their Is An Error While Getting The Server Infos
If ServerInfos.IsErroneous Then
' Show A Message Error With Error Id And Error Message
MessageBox.Show((("Error While Getting Server Infos !" & vbCr & vbLf + ServerInfos.ErrorId & " : ") + ServerInfos.ErrorMessage & vbCr & vbLf) + ServerInfos.ResponseText)
Else
btnDisconnect.Enabled = True
btnConnect.Enabled = False
End If
Next
End If
I'd Love some help. Thanks In Advance! :)