From 9dbb8f8eb3d07ee07cf7ce1beab72df056e157c6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 16 Aug 2018 12:06:36 +0300 Subject: New Implementation of PPC WiFI networks management! --- .../PPCApplication/DefaultPPCApplicationManager.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index db9ee3863..2d0ac96fa 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -108,14 +108,19 @@ namespace Tango.PPC.UI.PPCApplication /// /// Called when the main window content has been rendered /// - private async void OnMainWindowContentRendered() + private void OnMainWindowContentRendered() { LogManager.Log("Main window content rendered."); - PPCSettings settings = null; - ContentRendered?.Invoke(this, new EventArgs()); + StartApplication(); + } + + private async void StartApplication() + { + PPCSettings settings = null; + await Task.Factory.StartNew(() => { LogManager.Log("Reading PPC settings..."); @@ -154,14 +159,14 @@ namespace Tango.PPC.UI.PPCApplication } else { - OnDbInitialized(); + PostDbInitialize(); } } /// /// Called when the database has been initialized /// - private void OnDbInitialized() + private void PostDbInitialize() { LogManager.Log($"Raising {nameof(ApplicationStarted)} event..."); -- cgit v1.3.1