private void btnDeletePort_Click(object sender, EventArgs e)
{
if (lvPorts.SelectedItems.Count > 0)
{
var port = (Port) lvPorts.SelectedItems[0].Tag;
string prompt = String.Format(MessageManager.getMessage(MessageManager.CAPABILITY_PORT_DELETE),
port.name);
if (DialogResult.Yes ==
MessageBox.Show(prompt, @"V E R I F Y", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
{
lvPorts.Items.RemoveAt(lvPorts.SelectedItems[0].Index);
OnPortRemoved();
}
}
}