//кол-во найденных файлов public void FoundFilesAmount(FilesSearcher.FoundObjectInfo fileInfo) { if (lPercents.InvokeRequired) { labelCallBack lcb = new labelCallBack(FoundFilesAmount); this.Invoke(lcb, new object[] { fileInfo }); } else { lPercents.Text = foundFilesCount.ToString(); } }
public void ShowNextDeletedFile(FilesSearcher.FoundObjectInfo fileInfo) { if (lcurFileName.InvokeRequired) { labelCallBack newCallBack = new labelCallBack(ShowNextDeletedFile); this.Invoke(newCallBack, new object[] { fileInfo }); } else { lcurFileName.Text = fileInfo.Name; } }
public void DeletedFilesSize(FilesSearcher.FoundObjectInfo fileInfo) { if (lFilesSize.InvokeRequired) { labelCallBack lcb = new labelCallBack(CopiedFilesSize); this.Invoke(lcb, new object[] { fileInfo }); } else { copDelFilesSize += fileInfo.Size; lFilesSize.Text = "( " + BackgroundFinder.FormattedSizeString(copDelFilesSize) + " of " + BackgroundFinder.FormattedSizeString(foundFilesSize) + " )"; } }
public void DeletingPercents(FilesSearcher.FoundObjectInfo fileInfo) { if (lPercents.InvokeRequired) { labelCallBack lcb = new labelCallBack(DeletingPercents); this.Invoke(lcb, new object[] { fileInfo }); } else { float percents = 0; percents = (float)(deletedFilesCount + badFilesForDeleting.Count) / foundFilesCount * 100; lPercents.Text = copiedFilesCount.ToString() + " из " + foundFilesCount.ToString() + " ( " + percents + "% )"; } }
public void AddFoundFileToListBox(FilesSearcher.FoundObjectInfo fileInfo) { if (lbResults.InvokeRequired) { labelCallBack lcb = new labelCallBack(AddFoundFileToListBox); this.Invoke(lcb, new object[] { fileInfo }); } else { if ((lbResults.Items.Count > 0) && (lbResults.Items[lbResults.Items.Count - 1].ToString() != fileInfo.Name)) { lbResults.Items.Add(fileInfo.Name); lbResults.SelectedIndex = lbResults.Items.Count - 1; } if (lbResults.Items.Count == 0) { lbResults.Items.Add(fileInfo.Name); lbResults.SelectedIndex = lbResults.Items.Count - 1; } } }