/// <summary>
 /// Creates a new SecureRequestHandler.
 /// </summary>
 public SecureRequestHandler(IMainSettings mainSettings, ICredentialsStorage credentials, INavigationService navigationService,
                             IAuthenticator authenticator, IAuthenticationService authenticationService)
 {
     _mainSettings          = mainSettings;
     _credentials           = credentials;
     _navigationService     = navigationService;
     _authenticator         = authenticator;
     _authenticationService = authenticationService;
 }
        /// <summary>
        /// Creates a new SettingsViewModel.
        /// </summary>
        public SettingsViewModel(IMainSettings settings, IAuthenticator authenticator, INavigationService navigationService,
                                 IAuthenticationService authenticationService, ICredentialsStorage credentials, ITileService tileService)
        {
            Settings               = settings;
            Credentials            = credentials;
            _authenticator         = authenticator;
            _navigationService     = navigationService;
            _authenticationService = authenticationService;

            Settings.ListenToProperty(x => x.UseColoredTile, () =>
            {
                tileService.SetTileColoring(Settings.UseColoredTile);
            });
        }
Beispiel #3
0
        /// <summary>
        /// Creates a new AuthenticationViewModel.
        /// </summary>
        public AuthenticationViewModel(IAuthenticationService authenticationService, IAuthenticator authenticator,
                                       IServerAccess serverAccess, INavigationService navigationService,
                                       IServerSettings settings, ICredentialsStorage credentials,
                                       AuthenticationRequest request)
        {
            _authenticationService = authenticationService;
            _authenticator         = authenticator;
            _serverAccess          = serverAccess;
            _navigationService     = navigationService;
            _settings    = settings;
            _credentials = credentials;
            _request     = request;

            SaveCredentials = true;
        }
Beispiel #4
0
        /// <summary>
        /// Creates a new MainViewModel.
        /// </summary>
        public MainViewModel(IDataCache cache, INavigationService navigationService, IFoodService menuService,
                             ICredentialsStorage credentials, IPluginSettings settings, IServerSettings serverSettings)
            : base(cache)
        {
            _navigationService = navigationService;
            _menuService       = menuService;
            _credentials       = credentials;

            _mealDate = DateTime.Now;
            _mealTime = GetMealTime(_mealDate.Hour);

            AreRatingsEnabled = serverSettings.Configuration.AreFoodRatingsEnabled != 0;
            Settings          = settings;

            Settings.PropertyChanged += (_, __) =>
            {
                if (_fullMenu != null)
                {
                    Menu = FilterMenu(_fullMenu);
                    AllResultsFilteredOut = Menu.Length == 0 && _fullMenu.Length > 0;
                }
            };
        }
 public GoogleCredentials()
 {
     internalCredentials=new InMemoryCredentialStorage();
 }
Beispiel #6
0
 public GoogleCredentials()
 {
     internalCredentials = new InMemoryCredentialStorage();
 }