private void btn_delete_custom_figure_Click(object sender, EventArgs e) { if (cmb_custom_figures.SelectedIndex >= 0) { customFigureIsChange = true; CustomFigure.DeleteCustomFigure(cmb_custom_figures.SelectedIndex, cmb_custom_figures); } else { MessageBox.Show("Выберите фигуру", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btn_delete_custom_figure_Click(object sender, EventArgs e) { if (cmb_custom_figures.SelectedIndex >= 0) { customFigureIsChange = true; CustomFigure.DeleteCustomFigure(cmb_custom_figures.SelectedIndex, cmb_custom_figures); //cmb_custom_figures.Items.RemoveAt(cmb_custom_figures.SelectedIndex); } else { MessageBox.Show("Please, pick any custom figure in the combobox", "Woops...", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }