private void Load()
        {
            HardwareItemDescription hid = _item as HardwareItemDescription;

            if (hid != null)
            {
                Nodes.Add(hid.GetType().Name, hid.GetType().Name);
                List <object> ports = hid.Interface;
                if (ports != null)
                {
                    foreach (object port in ports)
                    {
                        PhysicalInterfacePorts pip = port as PhysicalInterfacePorts;
                        if (pip != null)
                        {
                            List <PhysicalInterfacePortsPort> pipps = pip.Port;
                            if (pipps != null)
                            {
                                foreach (PhysicalInterfacePortsPort pipp in pipps)
                                {
                                    string name      = pipp.name;
                                    string direction = pipp.directionSpecified?pipp.direction.ToString():"";
                                    string type      = pipp.typeSpecified ? pipp.type.ToString() : "";
                                    Nodes[hid.GetType().Name].Nodes.Add(name, name + " " + direction + " " + type);
                                    Nodes[hid.GetType().Name].Nodes[name].Tag = pipp;
                                }
                            }
                        }
                    }
                }
            }
        }
示例#2
0
 public NetworkPathSelectionForm(HardwareItemDescription hardwareItemDescription, bool capabilitiesOnly = false)
 {
     CapabilitiesOnly         = capabilitiesOnly;
     _hardwareItemDescription = hardwareItemDescription;
     InitializeComponent();
     InitializeListView();
 }
 public NetworkNodeMappingForm(HardwareItemDescription hardwareItemDescription)
 {
     InitializeComponent();
     treeView1.Item = hardwareItemDescription;
     treeView2.Item = hardwareItemDescription;
     treeView1.ExpandAll();
     treeView2.ExpandAll();
 }
示例#4
0
 public MappingForm(HardwareItemDescription hardwareItemDescription)
 {
     InitializeComponent();
     mappingControl.HardwareItemDescription = hardwareItemDescription;
 }