AsterixDisplayAnalyser.FrmAstxRecFrwdForm.button3_Click C# (CSharp) Метод

button3_Click() приватный Метод

private button3_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        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;
        }