private void btnDeleteFile_Click_1(object sender, EventArgs e) { if (lvFiles.SelectedItems.Count == 0) { return; } string fileName = lvFiles.SelectedItems[0].Text; CryptoServiceClient cloudProxy = new CryptoServiceClient(); bool deleteSuccessfull = cloudProxy.DeleteFIle(fileName); if (deleteSuccessfull) { MessageBox.Show("File successfully deleted.", "Delete successfull", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error while deleting file.", "Delete error", MessageBoxButtons.OK, MessageBoxIcon.Error); } cloudProxy.Close(); showCloudFiles(); }