public SplashViewModel 
			(INavigationService navigationService,
			IAppInfoService infoService,
			IXMLStorage xmlStorage)
		{
			_xmlStorage = xmlStorage;

			_infoService = infoService;

			_navigationService = navigationService;
		}
Example #2
0
 public SettingsController(ILauncherService launcherService, IAppInfoService appInfoService, IAppDataService appDataService, Lazy<SettingsLayoutViewModel> settingsLayoutViewModel, 
     Lazy<GeneralSettingsViewModel> generalSettingsViewModel, Lazy<InfoSettingsViewModel> infoSettingsViewModel)
 {
     this.launcherService = launcherService;
     this.appInfoService = appInfoService;
     this.appDataService = appDataService;
     this.settingsLayoutViewModel = new Lazy<SettingsLayoutViewModel>(() => InitializeSettingsLayoutViewModel(settingsLayoutViewModel));
     this.generalSettingsViewModel = new Lazy<GeneralSettingsViewModel>(() => InitializeGeneralSettingsViewModel(generalSettingsViewModel));
     this.infoSettingsViewModel = new Lazy<InfoSettingsViewModel>(() => InitializeInfoSettingsViewModel(infoSettingsViewModel));
     this.launchWindowsStoreCommand = new AsyncDelegateCommand(LaunchWindowsStore);
 }
Example #3
0
 public AppController(ILauncherService launcherService, IAppInfoService appInfoService, SelectionService selectionService,
     Lazy<DataController> dataController, Lazy<AccountController> accountController, Lazy<NewsFeedsController> newsFeedsController, Lazy<SettingsController> settingsController, 
     Lazy<ShellViewModel> shellViewModel, Lazy<FeedListViewModel> feedListViewModel, Lazy<FeedItemListViewModel> feedItemListViewModel, Lazy<FeedItemViewModel> feedItemViewModel)
 {
     this.launcherService = launcherService;
     this.appInfoService = appInfoService;
     this.selectionService = selectionService;
     this.dataController = dataController;
     this.accountController = accountController;
     this.newsFeedsController = newsFeedsController;
     this.settingsController = settingsController;
     this.shellViewModel = shellViewModel;
     this.feedListViewModel = new Lazy<FeedListViewModel>(() => InitializeFeedListViewModel(feedListViewModel));
     this.feedItemListViewModel = new Lazy<FeedItemListViewModel>(() => InitializeFeedItemListViewModel(feedItemListViewModel));
     this.feedItemViewModel = new Lazy<FeedItemViewModel>(() => InitializeFeedItemViewModel(feedItemViewModel));
     this.navigateBackCommand = new DelegateCommand(NavigateBack, CanNavigateBack);
     this.showFeedListViewCommand = new DelegateCommand(() => SelectedNavigationItem = NavigationItem.FeedList);
     this.showFeedItemListViewCommand = new DelegateCommand(ShowFeedItemListView);
     this.showFeedItemViewCommand = new DelegateCommand(ShowFeedItemView);
     this.showReviewViewCommand = new AsyncDelegateCommand(ShowReviewView);
     this.showSettingsViewCommand = new DelegateCommand(ShowSettingsView);
     this.navigationStack = new Stack<NavigationItem>();
 }
        public static async Task Initialize(IUserService userService, IGroupService groupService, IAppInfoService appInfoService)
        {
            if (await userService.UserExistsAsync("13057686866"))
            {
                return;
            }
            long userId = await userService.AddNewAsync("13057686866", "周星星", "123456");

            long userId2 = await userService.AddNewAsync("13057686867", "周润发", "123456");

            long userId3 = await userService.AddNewAsync("13057686868", "周杰伦", "123456");

            long groupId = await groupService.AddNewAsync("演员");

            long groupId2 = await groupService.AddNewAsync("导演");

            long groupId3 = await groupService.AddNewAsync("编剧");

            long groupId4 = await groupService.AddNewAsync("监制");

            long groupId5 = await groupService.AddNewAsync("歌手");

            await groupService.AddUserToGroupAsync(groupId, userId);

            await groupService.AddUserToGroupAsync(groupId2, userId);

            await groupService.AddUserToGroupAsync(groupId3, userId);

            await groupService.AddUserToGroupAsync(groupId4, userId);

            await groupService.AddUserToGroupAsync(groupId, userId2);

            await groupService.AddUserToGroupAsync(groupId5, userId3);

            await appInfoService.AddNewAsync("测试 Key", "testKey00000000");
        }
Example #5
0
 public SettingsAboutPage()
 {
     _appInfoService = Resolver.Resolve <IAppInfoService>();
     Init();
 }
Example #6
0
 public ShellViewModel(IShellView view, IAppInfoService appInfoService) : base(view)
 {
     AppName = appInfoService.AppName;
 }
Example #7
0
        public App(
            AppOptions options,
            IAuthService authService,
            IConnectivity connectivity,
            IUserDialogs userDialogs,
            IDatabaseService databaseService,
            ISyncService syncService,
            ISettings settings,
            ILockService lockService,
            IGoogleAnalyticsService googleAnalyticsService,
            ILocalizeService localizeService,
            IAppInfoService appInfoService,
            IAppSettingsService appSettingsService,
            IDeviceActionService deviceActionService)
        {
            _options                = options ?? new AppOptions();
            _databaseService        = databaseService;
            _connectivity           = connectivity;
            _userDialogs            = userDialogs;
            _syncService            = syncService;
            _authService            = authService;
            _settings               = settings;
            _lockService            = lockService;
            _googleAnalyticsService = googleAnalyticsService;
            _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(myVault: _options.MyVault);
                }
            }
            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);
                });
            }
        }
Example #8
0
 public AppInfoController(IAppInfoService appInfoService)
 {
     _appInfoService = appInfoService;
 }
Example #9
0
        public App(
            string uri,
            IAuthService authService,
            IConnectivity connectivity,
            IUserDialogs userDialogs,
            IDatabaseService databaseService,
            ISyncService syncService,
            ISettings settings,
            ILockService lockService,
            IGoogleAnalyticsService googleAnalyticsService,
            ILocalizeService localizeService,
            IAppInfoService appInfoService,
            IAppSettingsService appSettingsService,
            IDeviceActionService deviceActionService)
        {
            _uri                    = uri;
            _databaseService        = databaseService;
            _connectivity           = connectivity;
            _userDialogs            = userDialogs;
            _syncService            = syncService;
            _authService            = authService;
            _settings               = settings;
            _lockService            = lockService;
            _googleAnalyticsService = googleAnalyticsService;
            _localizeService        = localizeService;
            _appInfoService         = appInfoService;
            _appSettingsService     = appSettingsService;
            _deviceActionService    = deviceActionService;

            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);
            });
        }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserAuthenticationService"/> class.
 /// </summary>
 /// <param name="userAuthentication">The user authentication.</param>
 /// <param name="emailService">The email service.</param>
 /// <param name="appInfoService">The app info service.</param>
 public UserAuthenticationService(IUserAuthentication userAuthentication, IEmailService emailService, IAppInfoService appInfoService)
 {
     _userAuthentication = userAuthentication;
     _emailService = emailService;
     _appInfoService = appInfoService;
 }
Example #11
0
 public HomeController(IAppInfoService appInfoService, IRequestInfoService reqInfoService)
 {
     this.AppInfoService     = appInfoService;
     this.RequestInfoService = reqInfoService;
 }
 public DataPointFactory(IAppInfoService appInfoService, IClock clock)
 {
     this.appInfoService = appInfoService;
     this.clock          = clock;
 }
 public AuthorizationFilter(IAppInfoService appInfoService)
 {
     this._appInfoService = appInfoService;
 }
Example #14
0
 public FileBrowserCommands(IAppInfoService appInfo)
 {
     _appInfo = appInfo;
 }
Example #15
0
 public AppInfoController(IAppInfoService AppInfoSvc)
 {
     this.AppInfoSvc = AppInfoSvc;
 }
Example #16
0
 public SendEmailController(IAppInfoService AppInfoSvc, SendSmtp SendSmtp)
 {
     this.AppInfoSvc = AppInfoSvc;
     this.SendSmtp   = SendSmtp;
 }
 public UCAuthorFilter()
 {
     this.appInfoService = appInfoService;
 }