private void ics_ContactListReceived(object sender, System.Collections.Hashtable contactListHash,
System.String contactList)
{
Invoke(new MethodInvoker(delegate
{
this.lvContact.Items.Clear();
foreach (DictionaryEntry de in contactListHash)
{
ListViewItem contactItem = new ListViewItem(de.Key.ToString());
if (de.Value.ToString() == "NLN")
{
contactItem.ForeColor = Color.Green;
}
else
{
contactItem.ForeColor = Color.Gray;
}
lvContact.Items.Add(contactItem);
lvContact.Invalidate();
lvContact.Refresh();
Invoke(new ContactListUpdatedDelegate(ContactListUpdated), null);
}
}
));
}