void UpdateStatus()
{
if (this.ListView == null)
return;
if (this.ListView.InvokeRequired)
{
ListView.Invoke(new UpdateStatusDelegate(UpdateStatus));
return;
}
IrcSharp.Extended.IrcConnection con = Connection;
SubItems[0].Text = con.ConnectionID.ToString();
if (!string.IsNullOrEmpty(con.NetworkName))
SubItems[1].Text = Connection.NetworkName;
else
SubItems[1].Text = "[Unnamed]";
if (con.IsLoggedIn)
SubItems[2].Text = String.Format("Connected, {0} channel open", con.Channels.Count);
else if(con.IsConnected)
SubItems[2].Text = "Connected, logging in...";
else
SubItems[2].Text = "Disconnected";
}