public MenuViewModel (IRepository repository, ICouchbaseService couchbaseService)
        {
            _repository = repository;
			_couchbaseService = couchbaseService;

            Items = new List<MenuItemViewModel> {
                new MenuItemViewModel {
                    Text = "Home",
                    ViewType = typeof(HomeView)
                },
                new MenuItemViewModel {
                    Text = "My Agenda",
                    ViewType = typeof(AgendaView)
                },
				new MenuItemViewModel {
					Text = "Conference Survey",
                    ViewType = typeof(ConferenceSurveyView)
				},
                new MenuItemViewModel {
                    Text = "Contacts",
                    ViewType = typeof(ContactsView)
                },
                new MenuItemViewModel {
                    Text = "Scavenger Hunt",
                    ViewType = typeof(Views.ScavengerHuntView)
                },
				new MenuItemViewModel {
					Text = "Profile",
					ViewType = typeof(EditProfileView)
				},
            };

            SelectedItem = Items [0];

			// receives a message from EditProfileViewModel once the user has saved their profile
			// forces the Menu header to update
			MessagingCenter.Subscribe<EditProfileViewModel> (this, "Profile", (sender) => {
				this.Initialize();
			});

            MessagingCenter.Subscribe<MenuItemViewModel> (this, "Tapped", sender => {
                SelectedItem = sender;
            });
        }
        public MenuViewModel(IRepository repository, ICouchbaseService couchbaseService)
        {
            _repository       = repository;
            _couchbaseService = couchbaseService;

            Items = new List <MenuItemViewModel> {
                new MenuItemViewModel {
                    Text     = "Home",
                    ViewType = typeof(HomeView)
                },
                new MenuItemViewModel {
                    Text     = "My Agenda",
                    ViewType = typeof(AgendaView)
                },
                new MenuItemViewModel {
                    Text     = "Conference Survey",
                    ViewType = typeof(ConferenceSurveyView)
                },
                new MenuItemViewModel {
                    Text     = "Contacts",
                    ViewType = typeof(ContactsView)
                },
                new MenuItemViewModel {
                    Text     = "Scavenger Hunt",
                    ViewType = typeof(Views.ScavengerHuntView)
                },
                new MenuItemViewModel {
                    Text     = "Profile",
                    ViewType = typeof(EditProfileView)
                },
            };

            SelectedItem = Items [0];

            // receives a message from EditProfileViewModel once the user has saved their profile
            // forces the Menu header to update
            MessagingCenter.Subscribe <EditProfileViewModel> (this, "Profile", (sender) => {
                this.Initialize();
            });

            MessagingCenter.Subscribe <MenuItemViewModel> (this, "Tapped", sender => {
                SelectedItem = sender;
            });
        }
 public LoginController(ICouchbaseService Service, ILogger <LoginController> logger)
 {
     this._service = Service;
     this.logger   = logger;
 }
Exemple #4
0
 public ContactsViewModel(IRepository repository, ICouchbaseService couchbaseService)
 {
     _repository       = repository;
     _couchbaseService = couchbaseService;
 }
 public Repository(ICouchbaseService couchbaseService)
 {
     _couchbaseService = couchbaseService;
 }