- private void btnTabort_Click(object sender, EventArgs e)
- {
- MessageBox.Show("Vill du verkligen ta bort artikeln?", "Avslut", MessageBoxButtons.YesNo);
- {
- if (DialogResult == DialogResult.Yes)
- {
- int index = listBox1.SelectedIndex;
- listBox1.Items.RemoveAt(index);
- VerktygsLista.GetList().RemoveAt(index);
- }
- else if (DialogResult == DialogResult.No)
- {
- }
- }
- }