Ejemplo n.º 1
0
        public RadarPage()
        {
            InitializeComponent();

            App                    app                    = ((App)Application.Current);
            RadarService           radarService           = app.GetService <RadarService>();
            WeatherLocationService weatherLocationService = app.GetService <WeatherLocationService>();
            AppPreferencesService  appPreferencesService  = app.GetService <AppPreferencesService>();

            _viewModel = new RadarViewModel(radarService, weatherLocationService, appPreferencesService);

            BindingContext = _viewModel;
        }
Ejemplo n.º 2
0
        public HomePage()
        {
            InitializeComponent();

            App                    myApp                  = ((App)Application.Current);
            WeatherService         weatherService         = myApp.GetService <WeatherService>();
            WeatherLocationService weatherLocationService = myApp.GetService <WeatherLocationService>();
            AppPreferencesService  appPreferencesService  = myApp.GetService <AppPreferencesService>();

            _viewModel = new HomeViewModel(weatherService, weatherLocationService, appPreferencesService);

            BindingContext = _viewModel;
        }
Ejemplo n.º 3
0
 public WeatherLocationServiceImp(AppPreferencesService appPreferencesService)
 {
     _appPrefs = appPreferencesService;
 }