public ViewPageViewModel() { _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _cipherService = ServiceContainer.Resolve <ICipherService>("cipherService"); _stateService = ServiceContainer.Resolve <IStateService>("stateService"); _totpService = ServiceContainer.Resolve <ITotpService>("totpService"); _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _auditService = ServiceContainer.Resolve <IAuditService>("auditService"); _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService"); _eventService = ServiceContainer.Resolve <IEventService>("eventService"); _passwordRepromptService = ServiceContainer.Resolve <IPasswordRepromptService>("passwordRepromptService"); _localizeService = ServiceContainer.Resolve <ILocalizeService>("localizeService"); _clipboardService = ServiceContainer.Resolve <IClipboardService>("clipboardService"); _logger = ServiceContainer.Resolve <ILogger>("logger"); CopyCommand = new AsyncCommand <string>((id) => CopyAsync(id, null), onException: ex => _logger.Exception(ex), allowsMultipleExecutions: false); CopyUriCommand = new AsyncCommand <LoginUriView>(uriView => CopyAsync("LoginUri", uriView.Uri), onException: ex => _logger.Exception(ex), allowsMultipleExecutions: false); CopyFieldCommand = new AsyncCommand <FieldView>(field => CopyAsync(field.Type == FieldType.Hidden ? "H_FieldValue" : "FieldValue", field.Value), onException: ex => _logger.Exception(ex), allowsMultipleExecutions: false); LaunchUriCommand = new Command <LoginUriView>(LaunchUri); TogglePasswordCommand = new Command(TogglePassword); ToggleCardNumberCommand = new Command(ToggleCardNumber); ToggleCardCodeCommand = new Command(ToggleCardCode); CheckPasswordCommand = new Command(CheckPasswordAsync); DownloadAttachmentCommand = new Command <AttachmentView>(DownloadAttachmentAsync); PageTitle = AppResources.ViewItem; }
public AlarmService(IOptions <DashboardOptions> options, ILogger <AlarmService> logger, ILocalizeService localizeService, IHttpReportsStorage storage) { Options = options.Value; Logger = logger; _localizeService = localizeService; _storage = storage; }
public LoginViewModel(IMvxNavigationService navigationService, Services.IAppSettings settings, IUserDialogs userDialogs, ILocalizeService localizeService) { _navigationService = navigationService; _settings = settings; _userDialogs = userDialogs; _localizeService = localizeService; }
public VTSListPresenter (Factory factory, ILocalizeService localaize) { _vtsListViewModel = factory.Get<VTSViewModel> (); _vtsListViewModel.Server = ConfigurationManager.SERVER; Label header = new Label { Text = localaize.Data.vacations,// "Vacations", Font = Font.SystemFontOfSize (30), TextColor = Color.FromHex ("#000"), HorizontalOptions = LayoutOptions.Center }; _listView = new ListView { ItemsSource = null, ItemTemplate = new DataTemplate (typeof(VTSListViewTemplate)) }; this.Padding = new Thickness (10, Device.OnPlatform (20, 0, 0), 10, 5); this.Content = new StackLayout { BackgroundColor = Color.FromHex ("#FFF"), Children = { header, _listView } }; changeListView(); }
public BaseViewModel(string title, IMvxLogProvider mvxLogProvider, IMvxNavigationService navigationService, IUserDialogs userDialog, ILocalizeService localizeService) { NavigationService = navigationService; MvxLogProvider = mvxLogProvider; Log = mvxLogProvider.GetLogFor(GetType()); UserDialog = userDialog; LocalizeService = localizeService; Title = title; SaveCommand = new MvxCommand( () => SaveTask = MvxNotifyTask.Create(SaveAsync(), onException: ex => LogException(ex)) ); DeleteCommand = new MvxCommand( () => DeleteTask = MvxNotifyTask.Create(DeleteAsync, onException: ex => LogException(ex)) ); AddCommand = new MvxCommand( () => AddTask = MvxNotifyTask.Create(AddAsync(), onException: ex => LogException(ex)) ); }
public DashboardDataHandle(IServiceProvider serviceProvider, IAuthService authService, IHttpReportsStorage storage, IScheduleService scheduleService, ILocalizeService localizeService) : base(serviceProvider) { _storage = storage; _scheduleService = scheduleService; _localizeService = localizeService; _authService = authService; }
public static ResourceResponseModel Localize(this ILocalizeService localizeService, ResourceRequestModel requestModel) { var task = localizeService.LocalizeAsync(requestModel, CancellationToken.None); task.Wait(); return(task.Result); }
public CommandService( IConfiguration configuration, ILocalizeService localizservice) { this.configuration = configuration; this.localizservice = localizservice; }
public ThirdViewModel(IMvxNavigationService navigationService, Services.IAppSettings settings, IUserDialogs userDialogs, ILocalizeService localizeService) { this.navigationService = navigationService; this.settings = settings; this.userDialogs = userDialogs; this.localizeService = localizeService; }
public ViewPageViewModel() { _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _cipherService = ServiceContainer.Resolve <ICipherService>("cipherService"); _userService = ServiceContainer.Resolve <IUserService>("userService"); _totpService = ServiceContainer.Resolve <ITotpService>("totpService"); _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _auditService = ServiceContainer.Resolve <IAuditService>("auditService"); _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService"); _eventService = ServiceContainer.Resolve <IEventService>("eventService"); _passwordRepromptService = ServiceContainer.Resolve <IPasswordRepromptService>("passwordRepromptService"); _localizeService = ServiceContainer.Resolve <ILocalizeService>("localizeService"); _clipboardService = ServiceContainer.Resolve <IClipboardService>("clipboardService"); CopyCommand = new Command <string>((id) => CopyAsync(id, null)); CopyUriCommand = new Command <LoginUriView>(CopyUri); CopyFieldCommand = new Command <FieldView>(CopyField); LaunchUriCommand = new Command <LoginUriView>(LaunchUri); TogglePasswordCommand = new Command(TogglePassword); ToggleCardNumberCommand = new Command(ToggleCardNumber); ToggleCardCodeCommand = new Command(ToggleCardCode); CheckPasswordCommand = new Command(CheckPasswordAsync); DownloadAttachmentCommand = new Command <AttachmentView>(DownloadAttachmentAsync); PageTitle = AppResources.ViewItem; }
public LoginDataService(IConfiguration configuration, IFileSystemService fileSystemService, ISQLitePlatform sqlitePlatform, ILocalizeService localizservice) { _configuration = configuration; _fileSystemService = fileSystemService; _sqlitePlatform = sqlitePlatform; _localizservice = localizservice; }
public App( string uri, IAuthService authService, IConnectivity connectivity, IUserDialogs userDialogs, IDatabaseService databaseService, ISyncService syncService, IFingerprint fingerprint, ISettings settings, ILockService lockService, IGoogleAnalyticsService googleAnalyticsService, ILocalizeService localizeService, IAppInfoService appInfoService) { _uri = uri; _databaseService = databaseService; _connectivity = connectivity; _userDialogs = userDialogs; _syncService = syncService; _authService = authService; _fingerprint = fingerprint; _settings = settings; _lockService = lockService; _googleAnalyticsService = googleAnalyticsService; _localizeService = localizeService; _appInfoService = appInfoService; SetCulture(); SetStyles(); if (authService.IsAuthenticated && _uri != null) { MainPage = new ExtendedNavigationPage(new VaultAutofillListLoginsPage(_uri)); } else if (authService.IsAuthenticated) { MainPage = new MainPage(); } else { MainPage = new ExtendedNavigationPage(new HomePage()); } MessagingCenter.Subscribe <Application, bool>(Current, "Resumed", async(sender, args) => { Device.BeginInvokeOnMainThread(async() => await CheckLockAsync(args)); await Task.Run(() => FullSyncAsync()).ConfigureAwait(false); }); MessagingCenter.Subscribe <Application, bool>(Current, "Lock", (sender, args) => { Device.BeginInvokeOnMainThread(async() => await CheckLockAsync(args)); }); MessagingCenter.Subscribe <Application, string>(Current, "Logout", (sender, args) => { Logout(args); }); }
public VacationsDataService(ModelConverter converter, IConfiguration configuration, IFileSystemService fileSystemService, ISQLitePlatform sqlitePlatform, ILocalizeService localizer) { _converter = converter; _configuration = configuration; _fileSystemService = fileSystemService; _sqlitePlatform = sqlitePlatform; _localizer = localizer; }
public App( AppOptions options, IAuthService authService, IConnectivity connectivity, IDatabaseService databaseService, ISyncService syncService, ISettings settings, ILockService lockService, ILocalizeService localizeService, IAppInfoService appInfoService, IAppSettingsService appSettingsService, IDeviceActionService deviceActionService) { _options = options ?? new AppOptions(); _authService = authService; _databaseService = databaseService; _connectivity = connectivity; _syncService = syncService; _settings = settings; _lockService = lockService; _localizeService = localizeService; _appInfoService = appInfoService; _appSettingsService = appSettingsService; _deviceActionService = deviceActionService; SetCulture(); SetStyles(); if (authService.IsAuthenticated) { if (_options.FromAutofillFramework && _options.SaveType.HasValue) { MainPage = new ExtendedNavigationPage(new VaultAddCipherPage(_options)); } else if (_options.Uri != null) { MainPage = new ExtendedNavigationPage(new VaultAutofillListCiphersPage(_options)); } else { MainPage = new MainPage(); } } else { MainPage = new ExtendedNavigationPage(new HomePage()); } if (Device.RuntimePlatform == Device.iOS) { MessagingCenter.Subscribe <Application, bool>(Current, "Resumed", async(sender, args) => { Device.BeginInvokeOnMainThread(async() => await _lockService.CheckLockAsync(args)); await Task.Run(() => FullSyncAsync()).ConfigureAwait(false); }); } }
public DashboardDataHandle(IServiceProvider serviceProvider, IOptions <DashboardOptions> options, IHealthCheckService healthCheckService, IAuthService authService, IHttpReportsStorage storage, IScheduleService scheduleService, ILocalizeService localizeService) : base(serviceProvider) { _storage = storage; _options = options.Value; _scheduleService = scheduleService; _localizeService = localizeService; _authService = authService; _healthCheckService = healthCheckService; }
public SecondViewModel(IMvxNavigationService navigationService, Services.IAppSettings settings, IUserDialogs userDialogs, ILocalizeService localizeService) { _navigationService = navigationService; _settings = settings; _userDialogs = userDialogs; _localizeService = localizeService; MainPageButtonText = "test"; }
public static string Translate(this ILocalizeService localizeService, string str) { Resources.TranslateExtension._cultureInfo = CrossSecureStorage.Current.GetValue("lang") != null ? new CultureInfo(CrossSecureStorage.Current.GetValue("lang")) : Mvx.IoCProvider.Resolve <ILocalizeService>().GetCurrentCultureInfo(); var lang = Resources.TranslateExtension._cultureInfo; var translation = AppResources.ResourceManager.GetString(str, lang); return(string.IsNullOrEmpty(translation) ? str : translation); }
public PreferenceService(IConfiguration configuration, IFileSystemService fileSystemService, ISQLitePlatform sqlitePlatform, ILocalizeService localizservice) { this.configuration = configuration; this.fileSystemService = fileSystemService; this.sqlitePlatform = sqlitePlatform; this.localizservice = localizservice; }
public SyncPageViewModel() { _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _storageService = ServiceContainer.Resolve <IStorageService>("storageService"); _syncService = ServiceContainer.Resolve <ISyncService>("syncService"); _localizeService = ServiceContainer.Resolve <ILocalizeService>("localizeService"); PageTitle = AppResources.Sync; }
public LoginViewModel([NotNull] IAuthenticationService authenticationService, [NotNull] ILocalizeService localizservice) { this.localizservice = localizservice; Guard.ThrowIfNull(authenticationService, nameof(authenticationService)); this.authenticationService = authenticationService; this.authenticationService.AuthenticationChanged += AuthenticationService_AuthenticationChanged; Initialize(); }
public MainPageViewModel(INavigationService navigationService, ILocalizeService localizeService) : base(navigationService) { this.localizeService = localizeService; Title = "Welcome"; LangString = localizeService.CurrentCulture.TwoLetterISOLanguageName.ToUpper(); EventsListCommand = new DelegateCommand(async() => await NavigateToEventsList()); MediSupplierCommand = new DelegateCommand(async() => await NavigateToMediSuppliers()); ChangeLocaleCommand = new DelegateCommand(ToggleLanguage); }
public VacationsViewModel ( IVacationManager vacationManager, ILocalizeService localizer, INetworkReachability networkReachability ) { _vacationManager = vacationManager; this.Localaizer = localizer; _networkReachability = networkReachability; LocalizationModel(); }
public MenuController() : base(UITableViewStyle.Plain, null) { _localizeService = FactorySingleton.Factory.Get <LocalizeService>(); InitMenuItem(); var section = new Section(); section.AddAll(menuItems); Root = new RootElement("....") { section }; }
public LoginPresenter(Factory factory, ILocalizeService localaize) { _localize = localaize; _factory = factory; _loginViewModel = factory.Get<LoginViewModel> (); _image = new Image { Source = "logo.png" }; _userName = new Entry { Placeholder = _localize.Data.username }; _password = new Entry { IsPassword = true, Placeholder = _localize.Data.password }; _loginButton = new Button { Text = _localize.Data.login }; _error = new Label { //Text = _loginViewModel.errorMessage,//_localize.Data.loginError, //TextColor = Color.Red,//FromHex ("#FA8072"), XAlign = TextAlignment.Center, IsVisible = false }; _loginButton.Clicked += onLoginButtonClicked; Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Padding = 50, Children ={ _image, _userName, _password, _loginButton, _error } }; }
private string CRC = "ASDASDYHRdasf"; //only for test TODO: add service for secure data check with CRC for block public PowerPcService( ModelConverter converter, IConfiguration configuration, IFileSystemService fileSystemService, ISQLitePlatform sqlitePlatform, ILocalizeService localizservice) { this.converter = converter; this.configuration = configuration; this.fileSystemService = fileSystemService; this.sqlitePlatform = sqlitePlatform; this.localizservice = localizservice; }
public LoginViewModel(ILoginManager userManager, ILocalizeService localizer, INetworkReachability networkReachability, IPlatformException platformException, IConfiguration config ) { _userManager = userManager; this.Localizer = localizer; _networkReachability = networkReachability; _platformException = platformException; _config = config; _offlinemode = !IsDeviceOnline(); ChangeLanguage(_config.GetDefaultLanguage.ToString()); }
public App() { cacheService = DependencyService.Get <ICacheService>(); logService = DependencyService.Get <ILogService>(); localizeService = DependencyService.Get <ILocalizeService>(); exceptionHandlersService = DependencyService.Get <IExceptionHandlersService>(); InitLocalization(); InitializeComponent(); NavigationPage navigationPage = new NavigationPage(new OnboardingView() { ViewModel = new OnboardingViewModel() }); NavigationPage.SetHasNavigationBar(navigationPage.CurrentPage, false); MainPage = navigationPage; }
public SettingsPageViewModel() { _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _cryptoService = ServiceContainer.Resolve <ICryptoService>("cryptoService"); _stateService = ServiceContainer.Resolve <IStateService>("stateService"); _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _environmentService = ServiceContainer.Resolve <IEnvironmentService>("environmentService"); _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService"); _vaultTimeoutService = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService"); _syncService = ServiceContainer.Resolve <ISyncService>("syncService"); _biometricService = ServiceContainer.Resolve <IBiometricService>("biometricService"); _policyService = ServiceContainer.Resolve <IPolicyService>("policyService"); _localizeService = ServiceContainer.Resolve <ILocalizeService>("localizeService"); _keyConnectorService = ServiceContainer.Resolve <IKeyConnectorService>("keyConnectorService"); _clipboardService = ServiceContainer.Resolve <IClipboardService>("clipboardService"); GroupedItems = new ObservableRangeCollection <ISettingsPageListItem>(); PageTitle = AppResources.Settings; }
public SettingsPageViewModel() { _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService"); _cryptoService = ServiceContainer.Resolve <ICryptoService>("cryptoService"); _stateService = ServiceContainer.Resolve <IStateService>("stateService"); _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService"); _environmentService = ServiceContainer.Resolve <IEnvironmentService>("environmentService"); _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService"); _vaultTimeoutService = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService"); _syncService = ServiceContainer.Resolve <ISyncService>("syncService"); _biometricService = ServiceContainer.Resolve <IBiometricService>("biometricService"); _policyService = ServiceContainer.Resolve <IPolicyService>("policyService"); _localizeService = ServiceContainer.Resolve <ILocalizeService>("localizeService"); _keyConnectorService = ServiceContainer.Resolve <IKeyConnectorService>("keyConnectorService"); _clipboardService = ServiceContainer.Resolve <IClipboardService>("clipboardService"); _loggerService = ServiceContainer.Resolve <ILogger>("logger"); GroupedItems = new ObservableRangeCollection <ISettingsPageListItem>(); PageTitle = AppResources.Settings; ExecuteSettingItemCommand = new AsyncCommand <SettingsPageListItem>(item => item.ExecuteAsync(), onException: _loggerService.Exception, allowsMultipleExecutions: false); }
public static string Translate(this ILocalizeService localizeService, string str) { var tranlation = AppResources.ResourceManager.GetString(str, localizeService.GetCurrentCultureInfo()); return(string.IsNullOrEmpty(tranlation) ? str : tranlation); }
public NewTripOverviewBasicViewModel(IMvxNavigationService navigationService, IMvxLogProvider mvxLogProvider, IUserDialogs userDialog, ILocalizeService localizeService) : base(Resources.AppResources.NewTripOverviewPageTitle, mvxLogProvider, navigationService, userDialog, localizeService) { CheckInToSpotCommand = new MvxCommand( () => NavigationTask = MvxNotifyTask.Create(CheckInToNewSpotAsync(), onException: ex => LogException(ex)) ); }
public ModelConverter(ILocalizeService localizer) { _localizer = localizer; }