CentralServerDemo.MainForm.ics_ContactListReceived C# (CSharp) Method

ics_ContactListReceived() private method

private ics_ContactListReceived ( object sender, System contactListHash, System contactList ) : void
sender object
contactListHash System
contactList System
return void
		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);

				}

			}
			));

		}
MainForm