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

moveDown_Click() private method

private moveDown_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void moveDown_Click(object sender, EventArgs e)
        {
            int curindex = ValLstBox.SelectedIndex;//ValLstBox.Items.IndexOf(LabeltextBox.Text);//
            string selecteditem = getItemAtIndex(curindex);
            if (curindex < ValLstBox.Items.Count -1)
            {
                ValLstBox.Items.RemoveAt(curindex);//selected removed
                string s = getItemAtIndex(curindex + 1);
                ValLstBox.Items.Insert(curindex + 1, selecteditem);
                ValLstBox.SelectedIndex = curindex + 1;
            }
        }
    }