diff --git a/OpenRPA.Interfaces/Config.cs b/OpenRPA.Interfaces/Config.cs index b31c9c17..cae9dc2b 100644 --- a/OpenRPA.Interfaces/Config.cs +++ b/OpenRPA.Interfaces/Config.cs @@ -418,7 +418,7 @@ public T GetProperty(string pluginname, T mydefault, [System.Runtime.Compiler try { var c = new System.Drawing.RectangleConverter(); - value = c.ConvertFromString(value.ToString()); + value = c.ConvertFromString(null, new System.Globalization.CultureInfo("en-US"), value.ToString()); return (T)value; } catch (Exception) @@ -427,7 +427,7 @@ public T GetProperty(string pluginname, T mydefault, [System.Runtime.Compiler try { var c = new System.Drawing.RectangleConverter(); - value = c.ConvertFromString(null, new System.Globalization.CultureInfo("en-US"), value.ToString()); + value = c.ConvertFromString(value.ToString()); return (T)value; } catch (Exception) diff --git a/OpenRPA.Interfaces/GenericTools.cs b/OpenRPA.Interfaces/GenericTools.cs index f85f52dc..f2b6536a 100644 --- a/OpenRPA.Interfaces/GenericTools.cs +++ b/OpenRPA.Interfaces/GenericTools.cs @@ -170,42 +170,50 @@ public static async Task RunUIAsync(System.Windows.Window window, Func + try { - try + if (AutomationHelper.syncContext == null) { - action(); + AutomationHelper.syncContext = System.Threading.SynchronizationContext.Current; } - catch (Exception ex) + AutomationHelper.syncContext.Send(o => { - Log.Error(ex.ToString()); - } - }, null); + try + { + action(); + } + catch (Exception ex) + { + Log.Error(ex.ToString()); + } + }, null); + } + finally + { + System.Threading.Monitor.Exit(statelock); + } } - finally - { - System.Threading.Monitor.Exit(statelock); + else { + // throw new LockNotReceivedException("Failed returning list of workflow instances"); + Log.Error("Failed getting exclusive UIThread lock"); } } - else { - // throw new LockNotReceivedException("Failed returning list of workflow instances"); + catch (Exception ex) + { + Log.Error(ex.ToString()); } } - catch (Exception ex) - { - Log.Error(ex.ToString()); - } } private delegate void SafeCallDelegate(); public static void RunUI(System.Windows.Forms.Form window, Action action) diff --git a/OpenRPA.Interfaces/Plugins.cs b/OpenRPA.Interfaces/Plugins.cs index 67a4b3dd..bac14a1f 100644 --- a/OpenRPA.Interfaces/Plugins.cs +++ b/OpenRPA.Interfaces/Plugins.cs @@ -292,16 +292,20 @@ public static void LoadPlugins(IOpenRPAClient client, string projectsDirectory, if (dllFile.Contains("grpc_csharp_ext")) continue; if (dllFile.Contains("chrome_elf.")) continue; if (dllFile.Contains("d3dcompiler_")) continue; - if (dllFile.Contains("libcef.dll")) continue; - if (dllFile.Contains("libEGL.dll")) continue; - if (dllFile.Contains("libGLESv2.dll")) continue; - if (dllFile.Contains("WindowsAccessBridge-32.dll")) continue; - if (dllFile.Contains("WindowsAccessBridge-64.dll")) continue; - if (dllFile.Contains("WindowsAccessBridge.dll")) continue; - if (dllFile.Contains("vk_swiftshader.dll")) continue; - if (dllFile.Contains("vulkan-1.dll")) continue; - if (dllFile.Contains("cvextern.dll")) continue; - if (dllFile.Contains("opencv_videoio_ffmpeg455_64.dll")) continue; + if (dllFile.EndsWith("libcef.dll")) continue; + if (dllFile.EndsWith("libEGL.dll")) continue; + if (dllFile.EndsWith("libGLESv2.dll")) continue; + if (dllFile.EndsWith("WindowsAccessBridge-32.dll")) continue; + if (dllFile.EndsWith("WindowsAccessBridge-64.dll")) continue; + if (dllFile.EndsWith("WindowsAccessBridge.dll")) continue; + if (dllFile.EndsWith("vk_swiftshader.dll")) continue; + if (dllFile.EndsWith("vulkan-1.dll")) continue; + if (dllFile.EndsWith("cvextern.dll")) continue; + if (dllFile.EndsWith("opencv_videoio_ffmpeg455_64.dll")) continue; + if (dllFile.EndsWith("BouncyCastle.Crypto.dll")) continue; + if (dllFile.EndsWith("MailKit.dll")) continue; + if (dllFile.EndsWith("MimeKit.dll")) continue; + AssemblyName an = AssemblyName.GetAssemblyName(dllFile); Assembly assembly = Assembly.Load(an); // assemblies.Add(assembly); diff --git a/OpenRPA/OpenRPA.csproj b/OpenRPA/OpenRPA.csproj index 1b4853aa..3cea4cf4 100644 --- a/OpenRPA/OpenRPA.csproj +++ b/OpenRPA/OpenRPA.csproj @@ -11,7 +11,7 @@ Base UI of OpenRPA, used as part of OpenRPA robot MPL-2.0 https://github.com/open-rpa/openrpa - 1.4.55 + 1.4.56 openrpa.png Debug;Release;ReleaseNuget;PrepInstaller diff --git a/OpenRPA/RobotInstance.cs b/OpenRPA/RobotInstance.cs index 03c54c92..0620a6da 100644 --- a/OpenRPA/RobotInstance.cs +++ b/OpenRPA/RobotInstance.cs @@ -1341,7 +1341,7 @@ private async void RobotInstance_WebSocketClient_OnOpen() } GenericTools.RunUI(() => { - if (pendingwin.result == false) + if (pendingwin == null || pendingwin.result == false) { try {