/// <summary> /// Cand butonul de delete e apasat, toate fisierele selectate isi vor avea /// id-ul pus intr-o lista ce va fi trimis catre API. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void deleteButton_Click(object sender, EventArgs e) { List <int> filesToMark = new List <int>(); var fileIndices = fileView.CheckedIndices.Cast <int>(); foreach (int file in fileIndices) { filesToMark.Add(Files[file].Id); } FileAPI.MarkForDeletion(filesToMark); UpdateFileList(); }
/// <summary> /// Aceasta metoda marcheaza fisierele primite ca id pentru a fi sterse /// atunci cand butonul "Confirm Delete" este apasat de catre utilizator. /// </summary> /// <param name="fileIndices">Lista cu id-urile fisierelor ce vor fi marcate.</param> /// <returns>Un boolean care spune daca adaugarea a fost realizata cu succes.</returns> bool IFile.MarkForDeletion(List <int> fileIndices) { return(FileAPI.MarkForDeletion(fileIndices)); }