MrZork wrote...
I just want to say how impressed I am at how quickly you guys have come together with ideas and even implementations. And to say thanks. '>
Baaleos, is your C# project one that I could compile with the .NET Framework SDK? I just want to recompile with ServerBrowser.cs altered to point to a server list to which I have added a row for the server I've been playing on.
BTW, one potential fly in the changing-the-hosts-file ointment is that it may cause trouble with other (newer) games that still use gamespy... Perhaps the wrapper approach would allow use of the in-game server list without that issue?
Im not all the familiar with the .Net Framework SDK
The project on vault was compiled in VS 2010 -
but should also compile in VS2010 Express
The Contents of the datagrid are come from an external website (a cached version of the master server list)
In theory, you could modify the DelayedStart method inside the class.
private void DelayedStart()
{
Thread.Sleep(2000); //Delayed Start to give windows time to get the form to display
string sText = GetMasterServerList();
string[] sSpliter = { "<tr>" };
string[] sRows = sText.Split(sSpliter, StringSplitOptions.RemoveEmptyEntries);
//MessageBox.Show(sRows.Length.ToString());
int i = 8;
string[] sSplit2 = { "<td class=\\"td1\\">" };
for (i = 8; i < sRows.Length - 1; i++)
{
string sRow = sRows[i];
string[] sColumns = sRow.Split(sSplit2, StringSplitOptions.RemoveEmptyEntries);
string sIP = sColumns[0].Replace("</td>", "");
string sPort = sColumns[1].Replace("</td>", "");
string sName = sColumns[5].Replace("</td>", "");
string[] sRowToAdd = { sName, sIP, sPort };
AddRow(dgServers,sRowToAdd);
}
//MessageBox.Show("Done");
ProcessList();
}
If you dont care about the master server list, and just want your own server in there.
Just change
string[] sRowToAdd = {"Your Server Name", "Your IP", "Your Port"};
Also - u can take it out of the loop, if you dont care about the rest.
private void DelayedStart()
{
Thread.Sleep(2000); //Delayed Start to give windows time to get the form to display
string sRow = {"ServerNameHere","IP Here","PORT HERE"};
AddRow(dgServers,sRow);
}