ATMLCommonLibrary.controls.lists.PhysicalInterfaceListControl.btnEditPort_Click C# (CSharp) Method

btnEditPort_Click() private method

private btnEditPort_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void btnEditPort_Click( object sender, EventArgs e )
        {
            if (lvPorts.SelectedItems.Count > 0)
            {
                var form = new PhysicalInterfacePortForm( _physicalInterfaceConnectors );
                form.Port = (PhysicalInterfacePortsPort) lvPorts.SelectedItems[0].Tag;
                if (DialogResult.OK == form.ShowDialog())
                {
                    lvPorts.SelectedItems[0].Tag = form.Port;
                    lvPorts.UpdatePort( lvPorts.SelectedItems[0] );
                    lvPortConnectors.Port = (PhysicalInterfacePortsPort) lvPorts.SelectedItems[0].Tag;
                }
            }
        }