From f0bcdcdbfa78ba705b8fa44591fa594a425352a9 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 15 Jun 2018 23:18:51 +0300 Subject: Implemented TouchLoadingPanel --- .../PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 6 ++---- Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') 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 233751ddb..554bd704c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -128,10 +128,8 @@ namespace Tango.PPC.UI.PPCApplication var settings = SettingsManager.Default.GetOrCreate(); ; - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - Machine = db.Machines.SingleOrDefault(x => x.SerialNumber == settings.MachineSerialNumber); - } + ObservablesEntitiesAdapter.Instance.Initialize(); + Machine = ObservablesEntitiesAdapter.Instance.Machines.FirstOrDefault(); }); ApplicationStarted?.Invoke(this, new EventArgs()); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs index f6b06ca61..5bc02f829 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -36,11 +36,6 @@ namespace Tango.PPC.UI.ViewModels /// public async override void OnApplicationStarted() { - await Task.Factory.StartNew(() => - { - ObservablesEntitiesAdapter.Instance.Initialize(); - }); - ApplicationManager.ModulesInitialized += (_, __) => { NavigationManager.NavigateTo(NavigationView.HomeModule); -- cgit v1.3.1