From cbb5691982118c2b13da99806991ed8dd96fa6c1 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Tue, 20 Aug 2024 21:03:56 +0200 Subject: [PATCH] add Dispatcher.Invoke --- scripts/main.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index f5c9b978..6bfa1215 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -84,10 +84,15 @@ try { # Load the configuration files #Invoke-WPFUIElements -configVariable $sync.configs.nav -targetGridName "WPFMainGrid" -Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5 -Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2 -Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2 - +$sync.form.Dispatcher.Invoke([action] { + Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5 +}) +$sync.form.Dispatcher.Invoke([action] { + Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2 +}) +$sync.form.Dispatcher.Invoke([action] { + Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2 +}) #=========================================================================== # Store Form Objects In PowerShell