Exemplo n.º 1
0
        private void btnDeleteGrad_Click(object sender, EventArgs e)
        {
            if (cmbGrads.Items.Count > 1)
            {
                Colors.RemoveAt(gradindex);
                Angles.RemoveAt(gradindex);
                Positions.RemoveAt(gradindex);
                cmbGrads.Items.RemoveAt(gradindex);

                if (gradindex > 0)
                {
                    gradindex = gradindex - 1;
                }

                cmbGrads.SelectedIndex = gradindex;

                for (int i = gradindex; i < cmbGrads.Items.Count; i++)
                {
                    cmbGrads.Items[i] = "Gradient " + i;
                }
            }
        }