From cc0573c326f4695f40f5aafa6db745a8fda3bfc6 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 6 Mar 2017 06:12:16 +0100 Subject: [PATCH] Fix display of welcome screen. - Repariert: Willkommensdialog mit der Auswahl des Modus wurde technisch nicht gut angezeigt. --- zaaReloaded2/ThisAddIn.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zaaReloaded2/ThisAddIn.cs b/zaaReloaded2/ThisAddIn.cs index fd46177..7e188b6 100755 --- a/zaaReloaded2/ThisAddIn.cs +++ b/zaaReloaded2/ThisAddIn.cs @@ -26,6 +26,7 @@ using System.Windows.Input; using System.Windows.Controls; using System.Windows.Media; using System.Configuration; +using System.Windows.Threading; namespace zaaReloaded2 { @@ -89,7 +90,12 @@ namespace zaaReloaded2 Updater.Version.Current.ToString() ); - ViewModels.FirstRunViewModel.InjectIntoIfNeeded(); + _dispatcher = Dispatcher.CurrentDispatcher; + System.Threading.Timer timer = new System.Threading.Timer((obj) => + { + _dispatcher.Invoke((Action)(() => ViewModels.FirstRunViewModel.InjectIntoIfNeeded()), null); + + }, null, 1000, System.Threading.Timeout.Infinite); Logger.Info("ThisAddIn_Startup: Finished startup"); } @@ -184,6 +190,7 @@ namespace zaaReloaded2 Ribbon _ribbon; string _oldCaption; UpdaterViewModel _updaterVM; + Dispatcher _dispatcher; #endregion