コード例 #1
0
 public ExtensionPageViewModel()
 {
     _messagingService     = ServiceContainer.Resolve <IMessagingService>("messagingService");
     _storageService       = ServiceContainer.Resolve <IStorageService>("storageService");
     _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
     PageTitle             = AppResources.AppExtension;
 }
コード例 #2
0
        public GroupingsPageViewModel()
        {
            _cipherService           = ServiceContainer.Resolve <ICipherService>("cipherService");
            _folderService           = ServiceContainer.Resolve <IFolderService>("folderService");
            _collectionService       = ServiceContainer.Resolve <ICollectionService>("collectionService");
            _syncService             = ServiceContainer.Resolve <ISyncService>("syncService");
            _userService             = ServiceContainer.Resolve <IUserService>("userService");
            _vaultTimeoutService     = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService");
            _deviceActionService     = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService    = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _messagingService        = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _stateService            = ServiceContainer.Resolve <IStateService>("stateService");
            _storageService          = ServiceContainer.Resolve <IStorageService>("storageService");
            _passwordRepromptService = ServiceContainer.Resolve <IPasswordRepromptService>("passwordRepromptService");

            Loading        = true;
            PageTitle      = AppResources.MyVault;
            GroupedItems   = new ExtendedObservableCollection <GroupingsPageListGroup>();
            RefreshCommand = new Command(async() =>
            {
                Refreshing = true;
                await LoadAsync();
            });
            CipherOptionsCommand = new Command <CipherView>(CipherOptionsAsync);
        }
コード例 #3
0
ファイル: ViewPageViewModel.cs プロジェクト: bitwarden/mobile
        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;
        }
コード例 #4
0
        public DeleteAccountViewModel()
        {
            _platformUtilsService          = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _verificationActionsFlowHelper = ServiceContainer.Resolve <IVerificationActionsFlowHelper>("verificationActionsFlowHelper");

            PageTitle = AppResources.DeleteAccount;
        }
コード例 #5
0
        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;
        }
コード例 #6
0
 public DeviceRequest(string appId, IPlatformUtilsService platformUtilsService)
 {
     Type       = platformUtilsService.GetDevice();
     Name       = platformUtilsService.GetDeviceString();
     Identifier = appId;
     PushToken  = null; // TODO?
 }
コード例 #7
0
 public VaultTimeoutService(
     ICryptoService cryptoService,
     IUserService userService,
     IPlatformUtilsService platformUtilsService,
     IStorageService storageService,
     IFolderService folderService,
     ICipherService cipherService,
     ICollectionService collectionService,
     ISearchService searchService,
     IMessagingService messagingService,
     ITokenService tokenService,
     Action <bool> lockedCallback,
     Func <bool, Task> loggedOutCallback)
 {
     _cryptoService        = cryptoService;
     _userService          = userService;
     _platformUtilsService = platformUtilsService;
     _storageService       = storageService;
     _folderService        = folderService;
     _cipherService        = cipherService;
     _collectionService    = collectionService;
     _searchService        = searchService;
     _messagingService     = messagingService;
     _tokenService         = tokenService;
     _lockedCallback       = lockedCallback;
     _loggedOutCallback    = loggedOutCallback;
 }
コード例 #8
0
        public GroupingsPageViewModel()
        {
            _cipherService           = ServiceContainer.Resolve <ICipherService>("cipherService");
            _folderService           = ServiceContainer.Resolve <IFolderService>("folderService");
            _collectionService       = ServiceContainer.Resolve <ICollectionService>("collectionService");
            _syncService             = ServiceContainer.Resolve <ISyncService>("syncService");
            _vaultTimeoutService     = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService");
            _deviceActionService     = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService    = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _messagingService        = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _stateService            = ServiceContainer.Resolve <IStateService>("stateService");
            _passwordRepromptService = ServiceContainer.Resolve <IPasswordRepromptService>("passwordRepromptService");
            _organizationService     = ServiceContainer.Resolve <IOrganizationService>("organizationService");
            _policyService           = ServiceContainer.Resolve <IPolicyService>("policyService");
            _logger = ServiceContainer.Resolve <ILogger>("logger");

            Loading        = true;
            GroupedItems   = new ObservableRangeCollection <IGroupingsPageListItem>();
            RefreshCommand = new Command(async() =>
            {
                Refreshing = true;
                await LoadAsync();
            });
            CipherOptionsCommand = new Command <CipherView>(CipherOptionsAsync);

            AccountSwitchingOverlayViewModel = new AccountSwitchingOverlayViewModel(_stateService, _messagingService, _logger)
            {
                AllowAddAccountRow = true
            };
        }
コード例 #9
0
        public EnvironmentPage()
        {
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _messagingService     = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _messagingService.Send("showStatusBar", true);
            InitializeComponent();
            _vm      = BindingContext as EnvironmentPageViewModel;
            _vm.Page = this;
            if (Device.RuntimePlatform == Device.Android)
            {
                ToolbarItems.RemoveAt(0);
            }

            _webVaultEntry.ReturnType    = ReturnType.Next;
            _webVaultEntry.ReturnCommand = new Command(() => _apiEntry.Focus());
            _apiEntry.ReturnType         = ReturnType.Next;
            _apiEntry.ReturnCommand      = new Command(() => _identityEntry.Focus());
            _identityEntry.ReturnType    = ReturnType.Next;
            _identityEntry.ReturnCommand = new Command(() => _iconsEntry.Focus());
            _vm.SubmitSuccessAction      = () => Device.BeginInvokeOnMainThread(async() => await SubmitSuccessAsync());
            _vm.CloseAction = async() =>
            {
                _messagingService.Send("showStatusBar", false);
                await Navigation.PopModalAsync();
            };
        }
コード例 #10
0
        public UpdateTempPasswordPage()
        {
            // Service Init
            _messagingService     = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");

            // Service Use
            _messagingService.Send("showStatusBar", true);

            // Binding
            InitializeComponent();
            _pageName = string.Concat(nameof(UpdateTempPasswordPage), "_", DateTime.UtcNow.Ticks);
            _vm       = BindingContext as UpdateTempPasswordPageViewModel;
            _vm.Page  = this;
            SetActivityIndicator();

            // Actions Declaration
            _vm.LogOutAction = () =>
            {
                _messagingService.Send("logout");
            };
            _vm.UpdateTempPasswordSuccessAction = () => Device.BeginInvokeOnMainThread(UpdateTempPasswordSuccess);

            // Link fields that will be referenced in codebehind
            MasterPasswordEntry        = _masterPassword;
            ConfirmMasterPasswordEntry = _confirmMasterPassword;

            // Return Types and Commands
            _masterPassword.ReturnType           = ReturnType.Next;
            _masterPassword.ReturnCommand        = new Command(() => _confirmMasterPassword.Focus());
            _confirmMasterPassword.ReturnType    = ReturnType.Next;
            _confirmMasterPassword.ReturnCommand = new Command(() => _hint.Focus());
        }
コード例 #11
0
        public SendAddEditPageViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _sendService          = ServiceContainer.Resolve <ISendService>("sendService");
            TogglePasswordCommand = new Command(TogglePassword);

            TypeOptions = new List <KeyValuePair <string, SendType> >
            {
                new KeyValuePair <string, SendType>(AppResources.TypeText, SendType.Text),
                new KeyValuePair <string, SendType>(AppResources.TypeFile, SendType.File),
            };
            DeletionTypeOptions = new List <KeyValuePair <string, string> >
            {
                new KeyValuePair <string, string>(AppResources.OneHour, AppResources.OneHour),
                new KeyValuePair <string, string>(AppResources.OneDay, AppResources.OneDay),
                new KeyValuePair <string, string>(AppResources.TwoDays, AppResources.TwoDays),
                new KeyValuePair <string, string>(AppResources.ThreeDays, AppResources.ThreeDays),
                new KeyValuePair <string, string>(AppResources.SevenDays, AppResources.SevenDays),
                new KeyValuePair <string, string>(AppResources.ThirtyDays, AppResources.ThirtyDays),
                new KeyValuePair <string, string>(AppResources.Custom, AppResources.Custom),
            };
            ExpirationTypeOptions = new List <KeyValuePair <string, string> >
            {
                new KeyValuePair <string, string>(AppResources.Never, AppResources.Never),
                new KeyValuePair <string, string>(AppResources.OneHour, AppResources.OneHour),
                new KeyValuePair <string, string>(AppResources.OneDay, AppResources.OneDay),
                new KeyValuePair <string, string>(AppResources.TwoDays, AppResources.TwoDays),
                new KeyValuePair <string, string>(AppResources.ThreeDays, AppResources.ThreeDays),
                new KeyValuePair <string, string>(AppResources.SevenDays, AppResources.SevenDays),
                new KeyValuePair <string, string>(AppResources.ThirtyDays, AppResources.ThirtyDays),
                new KeyValuePair <string, string>(AppResources.Custom, AppResources.Custom),
            };
        }
コード例 #12
0
        public ApiService(
            ITokenService tokenService,
            IPlatformUtilsService platformUtilsService,
            Func <bool, Task> logoutCallbackAsync,
            string customUserAgent = null,
            bool?ignoreCertErrors  = null)
        {
            _tokenService         = tokenService;
            _platformUtilsService = platformUtilsService;
            _logoutCallbackAsync  = logoutCallbackAsync;
            var device = (int)_platformUtilsService.GetDevice();

            if (ignoreCertErrors ?? GlobalIgnoreCertErrors)
            {
                _httpClientHandler = new HttpClientHandler
                {
                    ServerCertificateCustomValidationCallback = (mg, ct, ch, er) => true,
                    //SslProtocols =
                    //    System.Security.Authentication.SslProtocols.Tls |
                    //    System.Security.Authentication.SslProtocols.Tls11 |
                    //    System.Security.Authentication.SslProtocols.Tls12,
                };
                _httpClient = new HttpClient(_httpClientHandler);
            }
            else
            {
                _httpClient = new HttpClient();
            }

            _httpClient.DefaultRequestHeaders.Add("Device-Type", device.ToString());
            if (!string.IsNullOrWhiteSpace(customUserAgent))
            {
                _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(customUserAgent);
            }
        }
コード例 #13
0
ファイル: Fido2Service.cs プロジェクト: DestruidorPT/mobile
 public Fido2Service()
 {
     this._apiService           = ServiceContainer.Resolve <IApiService>("apiService");
     this._authService          = ServiceContainer.Resolve <IAuthService>("authService");
     this._i18nService          = ServiceContainer.Resolve <II18nService>("i18nService");
     this._platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
 }
コード例 #14
0
 public VaultTimeoutService(
     ICryptoService cryptoService,
     IStateService stateService,
     IPlatformUtilsService platformUtilsService,
     IFolderService folderService,
     ICipherService cipherService,
     ICollectionService collectionService,
     ISearchService searchService,
     IMessagingService messagingService,
     ITokenService tokenService,
     IPolicyService policyService,
     IKeyConnectorService keyConnectorService,
     Func <Tuple <string, bool>, Task> lockedCallback,
     Func <Tuple <string, bool, bool>, Task> loggedOutCallback)
 {
     _cryptoService        = cryptoService;
     _stateService         = stateService;
     _platformUtilsService = platformUtilsService;
     _folderService        = folderService;
     _cipherService        = cipherService;
     _collectionService    = collectionService;
     _searchService        = searchService;
     _messagingService     = messagingService;
     _tokenService         = tokenService;
     _policyService        = policyService;
     _keyConnectorService  = keyConnectorService;
     _lockedCallback       = lockedCallback;
     _loggedOutCallback    = loggedOutCallback;
 }
コード例 #15
0
 public UserVerificationService(IApiService apiService, IPlatformUtilsService platformUtilsService,
                                II18nService i18nService, ICryptoService cryptoService)
 {
     _apiService           = apiService;
     _platformUtilsService = platformUtilsService;
     _i18nService          = i18nService;
     _cryptoService        = cryptoService;
 }
コード例 #16
0
        public FoldersPageViewModel()
        {
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _folderService        = ServiceContainer.Resolve <IFolderService>("folderService");

            PageTitle = AppResources.Folders;
            Folders   = new ExtendedObservableCollection <FolderView>();
        }
コード例 #17
0
        public SyncPageViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _syncService          = ServiceContainer.Resolve <ISyncService>("syncService");

            PageTitle = AppResources.Sync;
        }
コード例 #18
0
        public FolderAddEditPageViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _folderService        = ServiceContainer.Resolve <IFolderService>("folderService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");

            SubmitCommand = new Command(async() => await SubmitAsync());
        }
コード例 #19
0
 public CollectionsPageViewModel()
 {
     _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
     _cipherService        = ServiceContainer.Resolve <ICipherService>("cipherService");
     _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
     _collectionService    = ServiceContainer.Resolve <ICollectionService>("collectionService");
     Collections           = new ExtendedObservableCollection <CollectionViewModel>();
     PageTitle             = AppResources.Collections;
 }
コード例 #20
0
        public HintPageViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _apiService           = ServiceContainer.Resolve <IApiService>("apiService");

            PageTitle     = AppResources.PasswordHint;
            SubmitCommand = new Command(async() => await SubmitAsync());
        }
コード例 #21
0
        public BaseCipherViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _auditService         = ServiceContainer.Resolve <IAuditService>("auditService");
            _logger = ServiceContainer.Resolve <ILogger>("logger");

            CheckPasswordCommand = new AsyncCommand(CheckPasswordAsync, allowsMultipleExecutions: false);
        }
コード例 #22
0
        public override void ViewDidLoad()
        {
            _vaultTimeoutService  = ServiceContainer.Resolve <IVaultTimeoutService>("vaultTimeoutService");
            _cryptoService        = ServiceContainer.Resolve <ICryptoService>("cryptoService");
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _userService          = ServiceContainer.Resolve <IUserService>("userService");
            _storageService       = ServiceContainer.Resolve <IStorageService>("storageService");
            _secureStorageService = ServiceContainer.Resolve <IStorageService>("secureStorageService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _biometricService     = ServiceContainer.Resolve <IBiometricService>("biometricService");

            _pinSet        = _vaultTimeoutService.IsPinLockSetAsync().GetAwaiter().GetResult();
            _pinLock       = (_pinSet.Item1 && _vaultTimeoutService.PinProtectedKey != null) || _pinSet.Item2;
            _biometricLock = _vaultTimeoutService.IsBiometricLockSetAsync().GetAwaiter().GetResult() &&
                             _cryptoService.HasKeyAsync().GetAwaiter().GetResult();
            _biometricIntegrityValid = _biometricService.ValidateIntegrityAsync(BiometricIntegrityKey).GetAwaiter()
                                       .GetResult();

            BaseNavItem.Title      = _pinLock ? AppResources.VerifyPIN : AppResources.VerifyMasterPassword;
            BaseCancelButton.Title = AppResources.Cancel;
            BaseSubmitButton.Title = AppResources.Submit;

            var descriptor = UIFontDescriptor.PreferredBody;

            MasterPasswordCell.Label.Text = _pinLock ? AppResources.PIN : AppResources.MasterPassword;
            MasterPasswordCell.TextField.SecureTextEntry = true;
            MasterPasswordCell.TextField.ReturnKeyType   = UIReturnKeyType.Go;
            MasterPasswordCell.TextField.ShouldReturn   += (UITextField tf) =>
            {
                CheckPasswordAsync().GetAwaiter().GetResult();
                return(true);
            };
            if (_pinLock)
            {
                MasterPasswordCell.TextField.KeyboardType = UIKeyboardType.NumberPad;
            }

            TableView.RowHeight          = UITableView.AutomaticDimension;
            TableView.EstimatedRowHeight = 70;
            TableView.Source             = new TableSource(this);
            TableView.AllowsSelection    = true;

            base.ViewDidLoad();

            if (_biometricLock)
            {
                if (!_biometricIntegrityValid)
                {
                    return;
                }
                var tasks = Task.Run(async() =>
                {
                    await Task.Delay(500);
                    NSRunLoop.Main.BeginInvokeOnMainThread(async() => await PromptBiometricAsync());
                });
            }
        }
コード例 #23
0
        public AutofillCiphersPageViewModel()
        {
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _cipherService        = ServiceContainer.Resolve <ICipherService>("cipherService");
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");

            GroupedItems         = new ExtendedObservableCollection <GroupingsPageListGroup>();
            CipherOptionsCommand = new Command <CipherView>(CipherOptionsAsync);
        }
コード例 #24
0
        public PasswordHistoryPageViewModel()
        {
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _cipherService        = ServiceContainer.Resolve <ICipherService>("cipherService");

            PageTitle   = AppResources.PasswordHistory;
            History     = new ExtendedObservableCollection <PasswordHistoryView>();
            CopyCommand = new Command <PasswordHistoryView>(CopyAsync);
        }
コード例 #25
0
        public AutofillCiphersPage(AppOptions appOptions)
        {
            _appOptions = appOptions;
            InitializeComponent();
            _vm      = BindingContext as AutofillCiphersPageViewModel;
            _vm.Page = this;
            _vm.Init(appOptions);

            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
        }
コード例 #26
0
 public DeleteAccountActionFlowExecutioner(IApiService apiService,
                                           IMessagingService messagingService,
                                           IPlatformUtilsService platformUtilsService,
                                           IDeviceActionService deviceActionService)
 {
     _apiService           = apiService;
     _messagingService     = messagingService;
     _platformUtilsService = platformUtilsService;
     _deviceActionService  = deviceActionService;
 }
コード例 #27
0
        public CiphersPageViewModel()
        {
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _cipherService        = ServiceContainer.Resolve <ICipherService>("cipherService");
            _searchService        = ServiceContainer.Resolve <ISearchService>("searchService");
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");

            Ciphers = new ExtendedObservableCollection <CipherView>();
            CipherOptionsCommand = new Command <CipherView>(CipherOptionsAsync);
        }
コード例 #28
0
 public GeneratorPageViewModel()
 {
     _passwordGenerationService = ServiceContainer.Resolve <IPasswordGenerationService>(
         "passwordGenerationService");
     _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
     PageTitle             = AppResources.PasswordGenerator;
     TypeOptions           = new List <string> {
         AppResources.Password, AppResources.Passphrase
     };
 }
コード例 #29
0
        public GeneratorHistoryPageViewModel()
        {
            _platformUtilsService      = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _passwordGenerationService = ServiceContainer.Resolve <IPasswordGenerationService>(
                "passwordGenerationService");

            PageTitle   = AppResources.PasswordHistory;
            History     = new ExtendedObservableCollection <GeneratedPasswordHistory>();
            CopyCommand = new Command <GeneratedPasswordHistory>(CopyAsync);
        }
コード例 #30
0
 public AttachmentsPageViewModel()
 {
     _deviceActionService    = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
     _cipherService          = ServiceContainer.Resolve <ICipherService>("cipherService");
     _cryptoService          = ServiceContainer.Resolve <ICryptoService>("cryptoService");
     _platformUtilsService   = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
     _userService            = ServiceContainer.Resolve <IUserService>("userService");
     Attachments             = new ExtendedObservableCollection <AttachmentView>();
     DeleteAttachmentCommand = new Command <AttachmentView>(DeleteAsync);
     PageTitle = AppResources.Attachments;
 }