Exemplo n.º 1
0
 private void btRemove_Click(object sender, EventArgs e)
 {
     if (lstArquivos.SelectedIndex >= 0)
     {
         if (MessageBox.Show("Do you really want to remove this item?", "Remove Item", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             SelectedFiles.RemoveAt(lstArquivos.SelectedIndex);
             LoadListOfFiles();
         }
     }
 }
Exemplo n.º 2
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            if (listResources.SelectedIndex < 0)
            {
                return;
            }

            if (MessageBox.Show(@"Do you really want to remove this item?", @"Remove Item", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.Yes)
            {
                return;
            }

            _selectedFiles.RemoveAt(listResources.SelectedIndex);
            LoadListOfFiles();
        }