Ejemplo n.º 1
0
        public AuthViewModel(AuthView authView)
        {
            View = authView;
            _settings = new ImagenarySettings();

            Email = _settings.Email;
            Domain = _settings.Domain;
        }
Ejemplo n.º 2
0
        private void SetupUrlMapper()
        {
            var mapper = Resources["Mapper"] as UriMapper;
            RootFrame.UriMapper = mapper;

            var settings = new ImagenarySettings();

            if (string.IsNullOrWhiteSpace(settings.Token))
            {
                mapper.UriMappings[0].MappedUri = new Uri("/Views/AuthView.xaml", UriKind.Relative);
            }
            else
            {
                mapper.UriMappings[0].MappedUri = new Uri("/Views/MainView.xaml", UriKind.Relative);
            }
        }
Ejemplo n.º 3
0
        public MainViewModel()
        {
            IsDataLoaded = false;

            PhotoTagVisibility = Visibility.Visible;
            PhotoVisibility = Visibility.Collapsed;
            Photos = new ObservableCollection<PhotoViewModel>();

            _settings = new ImagenarySettings();
            _api = new ImagenaryApi(_settings.Domain);

            var locator = new GeoCoordinateWatcher(GeoPositionAccuracy.High)
            {
                MovementThreshold = 20
            };

            locator.PositionChanged += locator_PositionChanged;
            locator.Start();
        }