private void OpenNewReport(IRepositorySummaryDocType report) { List<SummaryDocType> listEntry = report.List(); if (this.txtSummaryReport.InvokeRequired) { this.txtSummaryReport.BeginInvoke(new DelegateOpenNewReport(CallReport), listEntry, report); } else CallReport(listEntry, report); }
private void CallReport(List<SummaryDocType> list, IRepositorySummaryDocType report) { string file = ((RepositorySummaryDocTypeTXT)report).ReportFilePath; long fullSizeBytes = 0; foreach (SummaryDocType item in list) { this.txtSummaryReport.Text += item.ToString(); fullSizeBytes += item.TotalSize; } this.lblLastReport.Text = "Last Report file in: " + file; this.lblTotalFiles.Text += " - " + ReportGenerator.GetFormatedSizeString(fullSizeBytes); }
public void ProcessFilesReport() { startTime = DateTime.Now; sw = Stopwatch.StartNew(); this.repSum = FactoryRepositorySummaryDocType.GetRepositorySummaryDocType(); // This path is a directory and his path is valid if (this.fileSystemHelper.IsValidPath(rootFolder)) { ProcessDirectory(rootFolder); } this.lastIndexTime = DateTime.Now; sw.Stop(); timeDif = sw.Elapsed; Log entryLog = new Log(); entryLog.TaskDescription = "Report File Created"; entryLog.ExecutionTime = timeDif; entryLog.StartDateTime = startTime; entryLog.LogParameters = new List<string>(); entryLog.LogParameters.Add("Quantity: " + this.quant.ToString()); entryLog.LogParameters.Add("Size: " + GetFormatedSizeString(this.totalSize).ToString()); this.repLog.Write(entryLog); this.CreateReport(); this.signalWorkDone(repSum); }