Example #1
0
 public IndexViewModel(rest_api.Models.Tip[] tips)
 {
     _tipsViewModel     = new TipsTableViewModel(tips);
     _pageTitle         = "Random Tips";
     _viewName          = "index";
     _jumboNavViewModel = new JumboNavViewModel(_viewName);
 }
Example #2
0
        public TagViewModel(rest_api.Models.Tip[] tips, string tag)
        {
            _tipsViewModel     = new TipsTableViewModel(tips);
            _viewName          = $"tag/{tag}";
            _jumboNavViewModel = new JumboNavViewModel(_viewName);
            TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;
            string   tagTitle = textInfo.ToTitleCase(tag);

            _pageTitle = $"{tagTitle} Tips";
        }
Example #3
0
 public SearchViewModel()
 {
     _pageTitle         = "Search Tips";
     _viewName          = "search";
     _jumboNavViewModel = new JumboNavViewModel(_viewName);
 }