AnalyticsUnlimited.Client_WPF.DGValuesForm.ValAddBut_Click C# (CSharp) Method

ValAddBut_Click() private method

private ValAddBut_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void ValAddBut_Click(object sender, EventArgs e)
        {
            string newl = LabeltextBox.Text;

            //validations here. 1.No duplicates, 2.v could be numeric only
            //Checking duplicate value and lable
            if(isDuplicate(newl))
            {
                MessageBox.Show("Duplicate entry!");
            }
            else
            {
                //Adding to list if value is unique
                ValLstBox.Items.Add( newl );
                //ValuetextBox.Text = "";
                LabeltextBox.Text = "";
            }

        }