V4.5
This commit is contained in:
13
PDF.cs
13
PDF.cs
@@ -167,7 +167,6 @@ namespace AiQ_GUI
|
||||
}
|
||||
|
||||
List<string> logLines = File.Exists(logFilePath) ? File.ReadAllLines(logFilePath).ToList() : new List<string>();
|
||||
|
||||
List<string> errorLines = logLines.Where(l => l.Contains("[ERROR]")).ToList();
|
||||
List<string> warningLines = logLines.Where(l => l.Contains("[WARNING]")).ToList();
|
||||
|
||||
@@ -337,7 +336,17 @@ namespace AiQ_GUI
|
||||
renderer.PdfDocument.Options.Layout = PdfWriterLayout.Compact;
|
||||
|
||||
// Construct save path
|
||||
string fullPath = TestRecordDir + CamSoak.Model + $"\\SoakTestReport_{CamSoak.Model}_{CamSoak.Serial}_{pcTime:dd-MM-yyyy_HH-mm-ss}" + (CamSoak.RMANum != 0 ? $" RMA{CamSoak.RMANum}" : "") + ".pdf";
|
||||
string SaveDir = TestRecordDir + CamSoak.Model;
|
||||
|
||||
if (!Directory.Exists(TestRecordDir))
|
||||
{
|
||||
SaveDir = Path.Combine(LDS.MAVPath, "SoakTestRecords"); // Gets local folder if the main TestRecordDir is not found (no google drive).
|
||||
if (!Directory.Exists(SaveDir))
|
||||
Directory.CreateDirectory(SaveDir);
|
||||
}
|
||||
|
||||
string fullPath = Path.Combine(SaveDir, $"SoakTestReport_{CamSoak.Model}_{CamSoak.Serial}_{pcTime:dd-MM-yyyy_HH-mm-ss}" + (CamSoak.RMANum != 0 ? $" RMA{CamSoak.RMANum}" : "") + ".pdf");
|
||||
//string fullPath = TestRecordDir + CamSoak.Model + $"\\SoakTestReport_{CamSoak.Model}_{CamSoak.Serial}_{pcTime:dd-MM-yyyy_HH-mm-ss}" + (CamSoak.RMANum != 0 ? $" RMA{CamSoak.RMANum}" : "") + ".pdf";
|
||||
|
||||
renderer.PdfDocument.Save(fullPath);
|
||||
Logging.LogMessage("Soak Test PDF saved to " + fullPath);
|
||||
|
||||
Reference in New Issue
Block a user