Change bot.IsConnected to be ConnectionState with Disconnected, Connecting, Connnected and Disconnecting states

This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-11 00:53:21 +01:00
parent ab4e6a02a5
commit dc39ec82fa
2 changed files with 22 additions and 5 deletions

View File

@@ -242,7 +242,7 @@ namespace pCampBot
lock (m_lBot)
{
if (m_lBot.TrueForAll(b => !b.IsConnected))
if (m_lBot.TrueForAll(b => b.ConnectionState == ConnectionState.Disconnected))
Environment.Exit(0);
break;
@@ -306,7 +306,7 @@ namespace pCampBot
MainConsole.Instance.OutputFormat(
outputFormat,
pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.IsConnected ? "Connected" : "Disconnected");
pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState);
}
}
}