/// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.DashboardPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        /// <param name="settingsFacade">Settings facade.</param>
        /// <param name="propertyFacade">Property facade.</param>
        /// <param name="storyFacade">Story facade.</param>
        /// <param name="keychainService">Keychain service.</param>
        public DashboardPageViewModel(
            IPageDialogService dialogService,
            IAuthenticationFacade authenticationFacade,
            ISettingsFacade settingsFacade,
            INavigationService navigationService,
            IPropertyFacade propertyFacade,
            IStoryFacade storyFacade,
            IKeychainService keychainService)
            : base(dialogService, authenticationFacade)
        {
            this.keychainService   = keychainService;
            this.settingsFacade    = settingsFacade;
            this.propertyFacade    = propertyFacade;
            this.storyFacade       = storyFacade;
            this.Title             = Constants.PageTitleDashboard;
            this.navigationService = navigationService;

            this.properties    = new ObservableCollection <PropertyViewModel>();
            this.Communities   = new ObservableCollection <StoryViewModel>();
            this.Events        = new ObservableCollection <StoryViewModel>();
            this.ActiveTabData = new ObservableCollection <StoryViewModel>();

            this.ExecuteAsyncTask(async() =>
            {
                await Task.WhenAll(new Task[] {
                    this.LoadProperty(),
                    this.LoadStories("event"),
                    this.LoadStories("story")
                });
            }).Forget();

            PopulateFakeProperties();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:CustomerPortal.Facade.Facades.AuthenticationFacade"/> class.
 /// </summary>
 /// <param name="settingsFacade">Settings facade.</param>
 public AuthenticationFacade(ISettingsFacade settingsFacade, IAuthenticationApiWrapper authApi, ILogApiWrapper logApi,
                             IAuthenticationHelperWrapper authenticationHelperWrapper, IKeychainService keychainService)
 {
     this.settingsFacade  = settingsFacade;
     this.keychainService = keychainService;
     _authApi             = authApi;
     _logApi = logApi;
     _authenticationHelperWrapper = authenticationHelperWrapper;
 }
 public BlankPageViewModel(INavigationService navigationService,
                           IAuthenticationFacade authenticationFacade,
                           IPageDialogService dialogService,
                           IKeychainService keychainService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.authenticationFacade = authenticationFacade;
     this.navigationService    = navigationService;
     this.keychainService      = keychainService;
 }
 /// <summary>Initializes a new instance of the <see cref="ProfilePageViewModel"/> class.</summary>
 /// <param name="dialogService">The dialog service.</param>
 /// <param name="authenticationFacade">The authentication facade.</param>
 /// <param name="accountFacade">The account Facade.</param>
 /// <param name="keychainService">The settings Facade.</param>
 public ProfilePageViewModel(
     IPageDialogService dialogService,
     IAuthenticationFacade authenticationFacade,
     IAccountFacade accountFacade,
     IKeychainService keychainService,
     INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.accountFacade   = accountFacade;
     this.keychainService = keychainService;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyDetailsPageViewModel"/> class.
 /// Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 ///     Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 ///     Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 /// </summary>
 /// <param name="dialogService">
 /// The dialog service.
 /// </param>
 /// <param name="authenticationFacade">
 /// The authentication facade.
 /// </param>
 /// <param name="propertyFacade">
 /// The property facade.
 /// </param>
 /// <param name="keychainService">
 /// The keychain Service.
 /// </param>
 public PropertyDetailsPageViewModel(
     IPageDialogService dialogService,
     IAuthenticationFacade authenticationFacade,
     IPropertyFacade propertyFacade,
     IKeychainService keychainService,
     INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.propertyFacade  = propertyFacade;
     this.keychainService = keychainService;
 }
 public AccountStatementsPageViewModel(IPageDialogService dialogService,
                                       IAuthenticationFacade authenticationFacade,
                                       IPropertyFacade propertyFacade,
                                       IKeychainService keychainService,
                                       INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.propertyFacade  = propertyFacade;
     this.keychainService = keychainService;
     this.properties      = new PropertyViewModel();
     this.Statements      = new ObservableCollection <StatementsViewModel>();
     this.CurrentBalance  = new ObservableCollection <StatementsViewModel>();
 }
Example #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.MainMenuPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="navigationService">Navigation service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        public MainMenuPageViewModel(IPageDialogService dialogService,
                                     INavigationService navigationService,
                                     IAuthenticationFacade authenticationFacade,
                                     IKeychainService keychainService) : base(dialogService, authenticationFacade, navigationService)
        {
            this.navigationService = navigationService;
            this.keychainService   = keychainService;

            this.LogoutCommand    = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LogoutAction).Forget(); });
            this.MyProfileCommand = new DelegateCommand(() =>
            {
                this.ExecuteAsyncTask(this.NavigateToProfilePage).Forget();
            });
        }
        public LoginPageViewModel(INavigationService navigationService,
                                  IAuthenticationFacade authenticationFacade,
                                  IPageDialogService dialogService,
                                  IKeychainService keychainService)
            : base(dialogService, authenticationFacade, navigationService)
        {
            this.authenticationFacade = authenticationFacade;
            this.navigationService    = navigationService;
            this.keychainService      = keychainService;

            this.LoginCommand = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LoginAction).Forget(); })
                                .ObservesCanExecute(() => this.CanLogin)
                                .ObservesProperty(() => this.Username)
                                .ObservesProperty(() => this.Password);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.MainMasterDetailPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        /// <param name="navigationService">Navigation service.</param>
        public MainMasterDetailPageViewModel(IPageDialogService dialogService,
                                             IAuthenticationFacade authenticationFacade,
                                             INavigationService navigationService,
                                             IKeychainService keychainService)
            : base(dialogService, authenticationFacade, navigationService)
        {
            this.navigationService = navigationService;
            this.keychainService   = keychainService;

            this.LogoutCommand = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LogoutAction).Forget(); });

            this.NavigationCommand = new DelegateCommand <string>((page) =>
            {
                navigationService.NavigateAsync(page);
            });
        }
Example #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        public AccountPageViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade, INavigationService navigationService, IPropertyFacade propertyFacade,
                                    IKeychainService keychainService) : base(dialogService, authenticationFacade, navigationService)
        {
            this.keychainService = keychainService;
            this.propertyFacade  = propertyFacade;
            this.Title           = "Account Page";

            this.PropertySelectedCommand = new DelegateCommand <PropertyViewModel>(this.PropertySelectedAction);

            this.navigationService = navigationService;
            PopulateStaticData();
            this.ExecuteAsyncTask(async() =>
            {
                await Task.WhenAll(new Task[] {
                    this.LoadProperty()
                });
            }).Forget();
        }
 public LifecycleService(ISettingsFacade settignsFacade, IDataAccessService dataAccessService, IKeychainService keychainService)
 {
     this.dataAccessService = dataAccessService;
     this.keychainService   = keychainService;
 }