From f03676747c3c4207da0be4e59273cbbca9b79649 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 31 May 2018 12:07:40 +0300 Subject: Implemented PPC data base source from %appdata% on PPC. --- .../Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs index e5f13e394..d728b7939 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs @@ -22,7 +22,20 @@ namespace Tango.PPC.Common public INotificationProvider NotificationProvider { get; private set; } - public PPCSettings Settings { get; private set; } + private PPCSettings _settings; + public PPCSettings Settings + { + get + { + if (_settings == null) + { + _settings = SettingsManager.Default.GetOrCreate(); + } + + return _settings; + } + private set { _settings = value; } + } public PPCViewModel(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) { @@ -30,8 +43,6 @@ namespace Tango.PPC.Common AuthenticationProvider = authentication; NavigationManager = navigation; NotificationProvider = notification; - - Settings = SettingsManager.Default.GetOrCreate(); } public abstract void OnApplicationStarted(); -- cgit v1.3.1