public CacheMapEditor() { InitializeComponent(); Loaded += (s, e) => { cacheCollectionVm = new CacheCollectionVM(cacheManager); DataContext = cacheCollectionVm; }; authenticatedUser = GeoCachingBLFactory.GetAuthenticationManager().AuthenticatedUser; CacheMap.Loaded += (s, e) => { CacheMap.Center = new Location(authenticatedUser.Position.Latitude, authenticatedUser.Position.Longitude); }; }
public AuthenticationWindow() { InitializeComponent(); try { authenticationManager = GeoCachingBLFactory.GetAuthenticationManager(); } catch { // any exception at this point means configuration for dal-assemblies do no work correctly --> end application with error message MessageBox.Show("Fatal Error: Could not load required program components.", "Fatal eror", MessageBoxButton.OK, MessageBoxImage.Error); Close(); } }
public GeoCachingService() { try { authenticationManager = GeoCachingBLFactory.GetAuthenticationManager(); cacheManager = GeoCachingBLFactory.GetCacheManager(); statisticsManager = GeoCachingBLFactory.GetStatisticsManager(); backendRunning = true; } catch { // in case of any exception when creating "connection" to backend, set flag // and do not provide access from outside backendRunning = false; } }
public CacheManager() { authenticatedUser = GeoCachingBLFactory.GetAuthenticationManager().AuthenticatedUser; }
public void Initialize() { authManager = GeoCachingBLFactory.GetAuthenticationManager(); }