private void SetStatus(DriveInfoProgressStatus status, string formatString = "{0}")
 {
     Status = status;
     ThreadSafeWinControlHelper.SetText(label2, string.Format(formatString, status));
 }
 public static IEnumerable <DriveInfoProgress> GetDriveInfoProgress(FlowLayoutPanel panel, DriveInfoProgressStatus status)
 {
     if (panel.InvokeRequired)
     {
         return((IEnumerable <DriveInfoProgress>)panel.Invoke(new GetDriveInfoProgressControlsDelegate(GetDriveInfoProgress), panel, status));
     }
     return(panel.Controls.Cast <DriveInfoProgress>().Where(item => item.Status.Equals(status)));
 }