private void button3_Click(object sender, EventArgs e)
{
// Code to remove the selected value from the list
if (this.checkedListBoxRecordingName.Items.Count > 0)
{
int IndexToDelete = this.checkedListBoxRecordingName.SelectedIndex;
this.checkedListBoxRecordingName.Items.RemoveAt(IndexToDelete);
this.listBoxLocalAddr.Items.RemoveAt(IndexToDelete);
this.listBoxIPAddress.Items.RemoveAt(IndexToDelete);
this.listBoxPort.Items.RemoveAt(IndexToDelete);
if (this.checkedListBoxRecordingName.Items.Count > 0)
{
this.checkedListBoxRecordingName.SelectedIndex = this.checkedListBoxRecordingName.Items.Count - 1;
}
UpdateForwardingCheckBoxes();
}
if (checkedListBoxRecordingName.Items.Count < 5)
this.btnAdd.Enabled = true;
else
this.btnAdd.Enabled = false;
}