private void FillPhysicalPortList()
{
if ( instrument.Interface != null )
{
foreach (object obj in instrument.Interface )
{
if (obj is PhysicalInterfacePorts)
{
PhysicalInterfacePorts pip = obj as PhysicalInterfacePorts;
if (pip.Port != null)
{
foreach (Port port in pip.Port)
{
//ListViewGroup grp = new ListViewGroup(port.name);
//grp.Tag = port;
//lvResourcePorts.Groups.Add(grp);
//if (resource.Interface != null && resource.Interface.Ports != null)
//{
// foreach (Port port in resource.Interface.Ports)
// {
ListViewItem lvi = new ListViewItem(port.name);
//lvi.Group = grp;
lvi.Tag = port;
lvPhysicalPorts.Items.Add(lvi);
SetListItemCheckState( port, lvi);
// }
//}
}
}
}
}
}
}