Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SillyDudeVm"/> class.
        /// </summary>
        /// <param name="navigationService">
        /// The navigation service.
        /// </param>
        /// <param name="sillyDudeService">
        /// The silly front service.
        /// </param>
        public SillyDudeVm(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _dudeService = sillyDudeService;

            SillyDudeLoaderNotifier = new TaskLoaderNotifier <SillyDudeVmo>();
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SillyDudeVm"/> class.
        /// </summary>
        /// <param name="navigationService">
        /// The navigation service.
        /// </param>
        /// <param name="sillyDudeService">
        /// The silly front service.
        /// </param>
        public SillyDudeVm(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _dudeService = sillyDudeService;

            SillyDudeLoader = new ViewModelLoader <SillyDudeVmo>();
        }
Esempio n. 3
0
        public HomePageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            SillyDudeLoaderNotifier = new TaskLoaderNotifier <SillyDudeVmo>();
        }
        public SillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            ErrorEmulator     = new ErrorEmulatorVm(errorEmulator, () => SillyPeopleLoader.Load(LoadSillyPeopleAsync));
            SillyPeopleLoader = new ViewModelLoader <ObservableCollection <SillyDudeVmo> >(ApplicationExceptions.ToString, SillyResources.Empty_Screen);
        }
Esempio n. 5
0
        public SillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            ErrorEmulator             = new ErrorEmulatorVm(errorEmulator, () => SillyPeopleLoaderNotifier.Load(LoadSillyPeopleAsync));
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <ObservableCollection <SillyDudeVmo> >();
        }
Esempio n. 6
0
 public SillyBottomTabsPageViewModel(
     INavigationService navigationService,
     ISillyDudeService sillyDudeService,
     ErrorEmulator errorEmulator)
     : base(navigationService)
 {
     HomePageViewModel = new HomePageViewModel(navigationService, sillyDudeService);
     ListPageViewModel = new ListPageViewModel(navigationService, sillyDudeService, errorEmulator);
     GridPageViewModel = new GridPageViewModel(navigationService, sillyDudeService);
 }
        public GridPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;

            InitCommands();

            SillyPeople               = new ObservableRangeCollection <SillyDudeVmo>();
            SillyPeoplePaginator      = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize);
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >();
        }
Esempio n. 8
0
        public SillyInfinitePeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            ErrorEmulator = new ErrorEmulatorVm(errorEmulator, Load);

            SillyPeople               = new ObservableRangeCollection <SillyDudeVmo>();
            SillyPeoplePaginator      = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize, loadingThreshold: 0.1f);
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >();
        }
        public SillyInfiniteGridPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;

            InitCommands();

            SillyPeople          = new ObservableRangeCollection <SillyDudeVmo>();
            SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize);
            SillyPeopleLoader    = new ViewModelLoader <IReadOnlyCollection <SillyDude> >(
                ApplicationExceptions.ToString,
                SillyResources.Empty_Screen);
        }
        public TwoPanePageViewModel(
            INavigationService navigationService,
            ISillyDudeService sillyDudeService,
            ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            SillyBottomTabsPageViewModel = new SillyBottomTabsPageViewModel(
                navigationService,
                sillyDudeService,
                errorEmulator);

            SillyDudeViewModel = new SillyDudeVm(navigationService, sillyDudeService);
        }
Esempio n. 11
0
        public HeaderFooterGroupingPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;

            InitCommands();

            SillyPeople               = new List <IDudeItem>();
            SillyPeoplePaginator      = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize);
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >();

            GoBackCommand = new TaskLoaderCommand(() => NavigationService.NavigateBackAsync());
        }
        public SillyInfinitePeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            ErrorEmulator = new ErrorEmulatorVm(errorEmulator, Load);

            SillyPeople          = new ObservableRangeCollection <SillyDudeVmo>();
            SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize, loadingThreshold: 0.1f);
            SillyPeopleLoader    = new ViewModelLoader <IReadOnlyCollection <SillyDude> >(
                ApplicationExceptions.ToString,
                SillyResources.Empty_Screen);
        }
Esempio n. 13
0
        public GridPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService)
            : base(navigationService)
        {
            _sillyDudeService  = sillyDudeService;
            _navigationService = navigationService;

            InitCommands();

            OnDragAndDropEndCommand = new Command(PosChanged);

            //CreateDudeCommand = new Command(CreateDude);

            DeleteDudeCommand = new Command(DeleteDude);
            SaveDudeCommand   = new Command(SaveDude);
            BackCommand       = new Command(Back);
            BackSaveCommand   = new Command(BackSave);

            SillyPeople               = new ObservableRangeCollection <SillyDudeVmo>();
            SillyPeoplePaginator      = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize);
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >();
        }
 public SortSillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService)
     : base(navigationService)
 {
     _sillyDudeService = sillyDudeService;
     InitCommands();
 }
Esempio n. 15
0
 public SortSillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService)
     : base(navigationService)
 {
     _sillyDudeService = sillyDudeService;
     SillyPeopleLoader = new ViewModelLoader(ApplicationExceptions.ToString, SillyResources.Empty_Screen);
 }