示例#1
0
 //кол-во найденных файлов
 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();
     }
 }
示例#2
0
 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;
     }
 }
示例#3
0
 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) + " )";
     }
 }
示例#4
0
 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 + "% )";
     }
 }
示例#5
0
        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;
                }
            }
        }