Code snippet:
try
{
VIZNET.Spiders.Event.EventHashtablePropertySpider aliasSpider = MyController["Form.Aliases"] as VIZNET.Spiders.Event.EventHashtablePropertySpider;
if (aliasSpider.OutputIOItems.Count == 0)
{
MessageBox.Show("No aliases defined");
}
else
{
//The name of the alias is in the entry.Key property;
//The value of the alias is in the DataElement.Value property;
//We simply iterate through the InputIOItems and display them here:
foreach (DictionaryEntry entry in aliasSpider.OutputIOItems)
{
IOItem item = entry.Value as IOItem;
DataElement de = (item.Value == null) ? null : item.Value as DataElement;
MessageBox.Show(entry.Key.ToString() + " :: " + ((de == null || de.Value == null) ? "EMPTY" : de.Value.ToString()));
}
}
}
catch (Exception ex)
{
MessageBox.Show("Oops. A problem occurred: " + ex.ToString());
}