From 5222521ea8c796919a83714f9d75ba169151fa3d Mon Sep 17 00:00:00 2001 From: Seal Report Date: Thu, 26 Oct 2023 15:43:23 +0200 Subject: [PATCH] 7.1 --- Projects/SealLibrary/SealLibrary.csproj | 1 + Projects/SealLibraryWin/Helpers/RazorHelper.cs | 4 +++- Projects/SealLibraryWin/Model/ReportExecution.cs | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Projects/SealLibrary/SealLibrary.csproj b/Projects/SealLibrary/SealLibrary.csproj index f0cb86b4..e5a9661c 100644 --- a/Projects/SealLibrary/SealLibrary.csproj +++ b/Projects/SealLibrary/SealLibrary.csproj @@ -143,6 +143,7 @@ + diff --git a/Projects/SealLibraryWin/Helpers/RazorHelper.cs b/Projects/SealLibraryWin/Helpers/RazorHelper.cs index 9caf2f4a..c1493142 100644 --- a/Projects/SealLibraryWin/Helpers/RazorHelper.cs +++ b/Projects/SealLibraryWin/Helpers/RazorHelper.cs @@ -40,6 +40,7 @@ using System.Security.AccessControl; using Twilio.Rest.Api.V2010.Account; using System.Net; +using System.Drawing; namespace Seal.Helpers { @@ -79,6 +80,7 @@ public class RazorHelper static FileSystemAccessRule _29 = null; static MessageResource.ScheduleTypeEnum _30 = null; static WebProxy _31 = null; + static Color? _32 = null; static int _loadTries = 3; static public void LoadRazorAssemblies() @@ -149,7 +151,7 @@ static public void LoadRazorAssemblies() if (_29 == null) _29 = new FileSystemAccessRule("a",FileSystemRights.Read,AccessControlType.Deny); if (_30 == null) _30 = new MessageResource.ScheduleTypeEnum(); if (_31 == null) _31 = new WebProxy(); - + if (_32 == null) _32 = ColorTranslator.FromHtml("#00000"); #if !WINDOWS var si = SealInterface.Create(); diff --git a/Projects/SealLibraryWin/Model/ReportExecution.cs b/Projects/SealLibraryWin/Model/ReportExecution.cs index 54cc2394..c297fde6 100644 --- a/Projects/SealLibraryWin/Model/ReportExecution.cs +++ b/Projects/SealLibraryWin/Model/ReportExecution.cs @@ -1518,7 +1518,11 @@ private void executeCellScript(ResultCell cell) } catch (Exception ex) { - Report.ExecutionMessages += string.Format("Error got when executing Cell script for '{0}' in model '{1}'\r\n{2}\r\n", cell.Element.DisplayNameEl, cell.Element.Model.Name, ex.Message); + var header = $"Error got when executing Cell script for '{cell.Element.DisplayNameEl}' in model '{cell.Element.Model.Name}'\r\n"; + if (!Report.ExecutionMessages.Contains(header)) + { + Report.ExecutionMessages += $"{header}{ex.Message}\r\n"; + } } }