Пример #1
0
		public void Set(MenuViewModel item)
		{
			if (!_styled)
				Style();

			_iconLabel.Text = item.IconChar;
			_titleLabel.Text = item.Title;
		}
Пример #2
0
		public void SelectRow(MenuViewModel row)
		{
			NSIndexPath path = null;

			if(null != row) _indexPathItems.TryGetValue(row, out path);

			if(null != TableView.IndexPathForSelectedRow) TableView.DeselectRow(TableView.IndexPathForSelectedRow,false);
			if(null != path) TableView.SelectRow(path, false, UITableViewScrollPosition.None);
		}
Пример #3
0
        private void ExecuteSelectMenuItemCommand(MenuViewModel item)
        {
            //navigate if we have to, pass the id so we can grab from cache... or not
            switch (item.Section)
            {
                case Section.MyPage:
                    if (_userAuthenticationService.GetUserId().Equals("Fant ikke brukerid"))
                        ShowViewModel<LoginViewModel>();
                    else
                        ShowViewModel<MyPageViewModel>();
                    break;
                case Section.Home:
                    ShowViewModel<HomeScreenViewModel>();
                    break;
                case Section.Search:
                    ShowViewModel<SearchViewModel>();
                    break;
                case Section.Lists:
                    ShowViewModel<SuggestionsListListViewModel>();
                    break;
                case Section.Events:
                    ShowViewModel<EventListViewModel>();
                    break;
                case Section.Blogs:
                    ShowViewModel<BlogOverviewViewModel>();
                    break;
                case Section.News:
                    ShowViewModel<NewsListingViewModel>();
                    break;
                case Section.OpeningHours:
                    ShowViewModel<OpeningHoursViewModel>();
                    break;
                case Section.Contact:
                    ShowViewModel<ContactInfoViewModel>();
                    break;
                case Section.Logout:
                    LogOut();

                    ShowViewModel<HomeScreenViewModel>();
                    break;
            }
        }