コード例 #1
0
ファイル: HomeViewModel.cs プロジェクト: showmap/smartwalk
        public HomeViewModel(
            ISmartWalkApiService apiService,
            IExceptionPolicyService exceptionPolicy,
            IAnalyticsService analyticsService,
            IReachabilityService reachabilityService,
            ILocationService locationService,
            IPostponeService postponeService)
            : base(reachabilityService, analyticsService, postponeService)
        {
            _apiService          = apiService;
            _exceptionPolicy     = exceptionPolicy;
            _analyticsService    = analyticsService;
            _locationService     = locationService;
            _reachabilityService = reachabilityService;

            _parameters = new Parameters();

            _locationService.LocationChanged       += (s, e) => UpdateData(UpdateEventInfos, false);
            _locationService.LocationStringChanged += (s, e) => UpdateLocationString();

            _reachabilityService.StateChanged += (s, e) => UpdateConnectedStatus().ContinueWithThrow();

            UpdateConnectedStatus().ContinueWithThrow();
            UpdateLocationString();
        }
コード例 #2
0
 public FileService(
     IMvxExtendedFileStore fileStore,
     IExceptionPolicyService exceptionPolicy)
 {
     _fileStore       = fileStore;
     _exceptionPolicy = exceptionPolicy;
 }
コード例 #3
0
 public OrgViewModel(
     IEnvironmentService environmentService,
     IConfiguration configuration,
     ISmartWalkApiService apiService,
     IAnalyticsService analyticsService,
     IExceptionPolicyService exceptionPolicy,
     IPostponeService postponeService) :
     base(configuration,
          environmentService,
          analyticsService,
          postponeService)
 {
     _apiService      = apiService;
     _exceptionPolicy = exceptionPolicy;
 }
コード例 #4
0
ファイル: VenueViewModel.cs プロジェクト: showmap/smartwalk
        public VenueViewModel(
            IEnvironmentService environmentService,
            IConfiguration configuration,
            ISmartWalkApiService apiService,
            IAnalyticsService analyticsService,
            IExceptionPolicyService exceptionPolicy,
            IPostponeService postponeService,
            IFavoritesService favoritesService) :
            base(
                configuration,
                environmentService,
                analyticsService,
                postponeService)
        {
            _environmentService = environmentService;
            _apiService         = apiService;
            _analyticsService   = analyticsService;
            _exceptionPolicy    = exceptionPolicy;

            FavoritesManager = new FavoritesShowManager(favoritesService, analyticsService);
        }
コード例 #5
0
        public OrgEventViewModel(
            IEnvironmentService environmentService,
            ISmartWalkApiService apiService,
            IConfiguration configuration,
            IAnalyticsService analyticsService,
            IExceptionPolicyService exceptionPolicy,
            ICalendarService calendarService,
            IPostponeService postponeService,
            IFavoritesService favoritesService)
            : base(environmentService.Reachability, analyticsService, postponeService)
        {
            _environmentService = environmentService;
            _apiService         = apiService;
            _configuration      = configuration;
            _analyticsService   = analyticsService;
            _calendarService    = calendarService;
            _exceptionPolicy    = exceptionPolicy;

            FavoritesManager = new FavoritesShowManager(favoritesService, analyticsService);
            FavoritesManager.FavoritesUpdated += (sender, e) => ResetAllShows();
        }
コード例 #6
0
ファイル: LocationService.cs プロジェクト: showmap/smartwalk
        public LocationService(
            ISettings settings,
            IExceptionPolicyService exceptionPolicy,
            IReachabilityService reachabilityService,
            IEnvironmentService environmentService)
        {
            _settings            = settings;
            _exceptionPolicy     = exceptionPolicy;
            _environmentService  = environmentService;
            _reachabilityService = reachabilityService;
            _reachabilityService.StateChanged +=
                (s, e) => UpdateLocationString().ContinueWithThrow();

            _geocoder        = new CLGeocoder();
            _locationManager = new CLLocationManager();
            _locationManager.DesiredAccuracy       = CLLocation.AccuracyThreeKilometers;
            _locationManager.DistanceFilter        = 3000; // 3 Km
            _locationManager.AuthorizationChanged += OnAuthorizationChanged;

            SaveLocationSettings(CurrentLocation);
            UpdateLocationString().ContinueWithThrow();
        }