private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e) { try { var ftpController = new FtpController(_ftpHost, _ftpUser, _ftpPass); for (int i = 0; i < _invoiceLst.Count; i++) { var inv = _invoiceLst[i]; inv.DownloadStatus = ftpController.FileExist(inv.Location).ToString(); } e.Result = true; } catch { } }
public void SetImage() { ResultModel.ResultImage = FtpController.GetImage(ResultModel.FilePath); pictureBox.Image = ResultModel.ResultImage; pictureBox.Invalidate(); }