Example #1
0
        public ToolsPage()
        {
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _deviceInfoService      = Resolver.Resolve <IDeviceInfoService>();

            Init();
        }
Example #2
0
        public ToolsPage()
        {
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
        public override void ViewDidLoad()
        {
            _siteService            = Resolver.Resolve <ISiteService>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _folderService          = Resolver.Resolve <IFolderService>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);

            NameCell.TextField.Text          = Context?.Url?.Host ?? string.Empty;
            NameCell.TextField.ReturnKeyType = UIReturnKeyType.Next;
            NameCell.TextField.ShouldReturn += (UITextField tf) =>
            {
                UriCell.TextField.BecomeFirstResponder();
                return(true);
            };

            UriCell.TextField.Text          = Context?.Url?.ToString() ?? string.Empty;
            UriCell.TextField.KeyboardType  = UIKeyboardType.Url;
            UriCell.TextField.ReturnKeyType = UIReturnKeyType.Next;
            UriCell.TextField.ShouldReturn += (UITextField tf) =>
            {
                UsernameCell.TextField.BecomeFirstResponder();
                return(true);
            };

            UsernameCell.TextField.AutocapitalizationType = UITextAutocapitalizationType.None;
            UsernameCell.TextField.AutocorrectionType     = UITextAutocorrectionType.No;
            UsernameCell.TextField.SpellCheckingType      = UITextSpellCheckingType.No;
            UsernameCell.TextField.ReturnKeyType          = UIReturnKeyType.Next;
            UsernameCell.TextField.ShouldReturn          += (UITextField tf) =>
            {
                PasswordCell.TextField.BecomeFirstResponder();
                return(true);
            };

            PasswordCell.TextField.SecureTextEntry = true;
            PasswordCell.TextField.ReturnKeyType   = UIReturnKeyType.Next;
            PasswordCell.TextField.ShouldReturn   += (UITextField tf) =>
            {
                NotesCell.TextView.BecomeFirstResponder();
                return(true);
            };

            GeneratePasswordCell.TextLabel.Text = AppResources.GeneratePassword;
            GeneratePasswordCell.Accessory      = UITableViewCellAccessory.DisclosureIndicator;

            _folders = _folderService.GetAllAsync().GetAwaiter().GetResult();
            var folderNames = _folders.Select(s => s.Name.Decrypt()).OrderBy(s => s).ToList();

            folderNames.Insert(0, AppResources.FolderNone);
            FolderCell.Items = folderNames;

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

            base.ViewDidLoad();
        }
        public ToolsAutofillServicePage()
        {
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _appInfoService         = Resolver.Resolve <IAppInfoService>();

            Init();
        }
 public AuthService(
     ISecureStorageService secureStorage,
     ITokenService tokenService,
     ISettings settings,
     IAppSettingsService appSettingsService,
     ICryptoService cryptoService,
     IConnectApiRepository connectApiRepository,
     IAccountsApiRepository accountsApiRepository,
     IAppIdService appIdService,
     IDeviceInfoService deviceInfoService,
     IDeviceApiRepository deviceApiRepository,
     IGoogleAnalyticsService googleAnalyticsService)
 {
     _secureStorage          = secureStorage;
     _tokenService           = tokenService;
     _settings               = settings;
     _appSettingsService     = appSettingsService;
     _cryptoService          = cryptoService;
     _connectApiRepository   = connectApiRepository;
     _accountsApiRepository  = accountsApiRepository;
     _appIdService           = appIdService;
     _deviceInfoService      = deviceInfoService;
     _deviceApiRepository    = deviceApiRepository;
     _googleAnalyticsService = googleAnalyticsService;
 }
Example #6
0
        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 ToolsAccessibilityServicePage()
        {
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _appInfoService         = Resolver.Resolve <IAppInfoService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();

            Init();
        }
Example #8
0
        public SettingsOptionsPage()
        {
            _settings               = Resolver.Resolve <ISettings>();
            _appSettings            = Resolver.Resolve <IAppSettingsService>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #9
0
        public ToolsPage(MainPage mainPage)
        {
            _mainPage = mainPage;
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _deviceInfoService      = Resolver.Resolve <IDeviceInfoService>();

            Init();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
        /// </summary>
        public MainWindowViewModel(IGoogleAnalyticsService googleAnalyticsService)
        {
            Argument.IsNotNull(() => googleAnalyticsService);

            _googleAnalyticsService = googleAnalyticsService;

            AccountId = "UA-54670241-1";
        }
        public static async Task SendViewModelClosedAsync(this IGoogleAnalyticsService googleAnalytics, string viewModel, TimeSpan duration)
        {
            Argument.IsNotNull("googleAnalytics", googleAnalytics);

            await googleAnalytics.SendEventAsync("ViewModels", string.Format("{0}.Closed", viewModel), viewModel);

            await googleAnalytics.SendTimingAsync(duration, "ViewModels", viewModel);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
        /// </summary>
        public MainWindowViewModel(IGoogleAnalyticsService googleAnalyticsService)
        {
            Argument.IsNotNull(() => googleAnalyticsService);

            _googleAnalyticsService = googleAnalyticsService;

            AccountId = "UA-54670241-1";
        }
Example #13
0
        public ToolsExtensionPage()
        {
            _settings = Resolver.Resolve <ISettings>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            Model = new AppExtensionPageModel(_settings);

            Init();
        }
        public EnvironmentPage()
            : base(updateActivity: false, requireAuth: false)
        {
            _appSettings            = Resolver.Resolve <IAppSettingsService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #15
0
 public AwaitNameState(
     IGoogleAnalyticsService googleAnalyticsService,
     ITwilioService twilioService,
     IMessageService messageService)
 {
     _googleAnalyticsService = googleAnalyticsService;
     _twilioService          = twilioService;
     _messageService         = messageService;
 }
Example #16
0
        public Feeder(IGoogleAnalyticsService googleAnalyticsService)
        {
            if (googleAnalyticsService == null)
            {
                throw new ArgumentNullException(nameof(googleAnalyticsService));
            }

            this.googleAnalyticsService = googleAnalyticsService;
        }
Example #17
0
        public EnvironmentPage()
            : base(updateActivity: false)
        {
            _appSettings            = Resolver.Resolve <IAppSettingsService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #18
0
 public SharedController(
     ICountryPageService countryPageService,
     IGoogleAnalyticsService googleAnalyticsService,
     ILanguagePageService languagePageService)
 {
     _countryPageService     = countryPageService;
     _googleAnalyticsService = googleAnalyticsService;
     _languagePageService    = languagePageService;
 }
Example #19
0
        public SettingsAddFolderPage()
        {
            _folderService          = Resolver.Resolve <IFolderService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #20
0
 public OrderState(
     ITwilioService twilioService,
     IGoogleAnalyticsService googleAnalyticsService,
     IOrderService orderService)
 {
     _twilioService          = twilioService;
     _googleAnalyticsService = googleAnalyticsService;
     _orderService           = orderService;
 }
        public SettingsAddFolderPage()
        {
            _folderService = Resolver.Resolve<IFolderService>();
            _userDialogs = Resolver.Resolve<IUserDialogs>();
            _connectivity = Resolver.Resolve<IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();

            Init();
        }
Example #22
0
        public SettingsSyncPage()
        {
            _syncService            = Resolver.Resolve <ISyncService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _settings               = Resolver.Resolve <ISettings>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
        public SettingsSyncPage()
        {
            _syncService            = Resolver.Resolve <ISyncService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _settings               = Resolver.Resolve <ISettings>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #24
0
 public BlogAnalytcsService(
     string hatenaViewId,
     string qiitaViewId,
     IGoogleAnalyticsService googleAnalyticsReader
     )
 {
     this.hatenaViewId          = hatenaViewId;
     this.qiitaViewId           = qiitaViewId;
     this.googleAnalyticsReader = googleAnalyticsReader;
 }
        public SettingsEditFolderPage(string folderId)
        {
            _folderId               = folderId;
            _folderService          = Resolver.Resolve <IFolderService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #26
0
        public SettingsEditFolderPage(string folderId)
        {
            _folderId               = folderId;
            _folderService          = Resolver.Resolve <IFolderService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
        public TrackDetailsViewModel(IGoogleAnalyticsService googleAnalyticsService)
        {
            Argument.IsNotNull(() => googleAnalyticsService);

            _googleAnalyticsService = googleAnalyticsService;

            Send = new TaskCommand(OnSendExecuteAsync, OnSendCanExecute);

            Category = "category";
            Action = "action";
        }
Example #28
0
        public VaultEditLoginPage(string loginId)
        {
            _loginId                = loginId;
            _loginService           = Resolver.Resolve <ILoginService>();
            _folderService          = Resolver.Resolve <IFolderService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #29
0
        public VaultCustomFieldsPage(string cipherId)
            : base(true)
        {
            _cipherId               = cipherId;
            _cipherService          = Resolver.Resolve <ICipherService>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #30
0
        public VaultEditSitePage(string siteId)
        {
            _siteId                 = siteId;
            _siteService            = Resolver.Resolve <ISiteService>();
            _folderService          = Resolver.Resolve <IFolderService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _connectivity           = Resolver.Resolve <IConnectivity>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #31
0
        // TODO: Model binding context?

        public SettingsPage()
        {
            _authService            = Resolver.Resolve <IAuthService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _settings               = Resolver.Resolve <ISettings>();
            _fingerprint            = Resolver.Resolve <IFingerprint>();
            _pushNotification       = Resolver.Resolve <IPushNotification>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();

            Init();
        }
Example #32
0
        public ExtendedContentPage(bool syncIndicator = false, bool updateActivity = true)
        {
            _syncIndicator          = syncIndicator;
            _updateActivity         = updateActivity;
            _syncService            = Resolver.Resolve <ISyncService>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _lockService            = Resolver.Resolve <ILockService>();
            _deviceActionService    = Resolver.Resolve <IDeviceActionService>();

            BackgroundColor = Color.FromHex("efeff4");
        }
        public AnalyticsConfigurationSynchronizer(IConfigurationService configurationService, IGoogleAnalyticsService googleAnalyticsService)
        {
            Argument.IsNotNull(() => configurationService);
            Argument.IsNotNull(() => googleAnalyticsService);

            _configurationService = configurationService;
            _googleAnalyticsService = googleAnalyticsService;

            _configurationService.ConfigurationChanged += OnConfigurationChanged;

            ApplyConfiguration();
        }
        public AnalyticsAuditor(IGoogleAnalyticsService analyticsService)
        {
            Argument.IsNotNull(() => analyticsService);

            _analyticsService = analyticsService;
        }
        public AnalyticsController(IGoogleAnalyticsService analyticsService)
        {
            Ensure.That(() => analyticsService).IsNotNull();

            this.analyticsService = analyticsService;
        }
 public ExceptionInterceptor(INotifier notifier, IGoogleAnalyticsService googleAnalytics)
 {
     this.notifier = notifier;
     this.googleAnalytics = googleAnalytics;
 }