Beispiel #1
0
        public static void NavigateTo(string stringField)
        {
            AbstractPage = PageByField(stringField);
            var start = AbstractPage as BaseStartPage;

            start.OpenUrl();
        }
Beispiel #2
0
        public BlogDetailsViewModel BuildDetails(IAbstractPage blogPage, int id)
        {
            var dto = BlogService.GetPost(id);

            return(new BlogDetailsViewModel
            {
                Title = dto.Title,
                Date = dto.PostDate.ToString("dd.MM.yyyy"),
                CategoryName = dto.Category?.Title,
                Image = dto.Image,
                YoutubeVideoCode = dto.YoutubeVideoCode,
                Tags = dto.Tags.Select(t => t.Title).ToList(),
                Text = dto.Text
            });
        }
Beispiel #3
0
        public BlogPageViewModel BuildList(IAbstractPage blogPage)
        {
            var vm = new BlogPageViewModel {
                Header = blogPage.Title
            };

            vm.Items.AddRange(BlogService.GetAllPosts().Select(p => new BlogItemInListViewModel
            {
                Id               = p.Id,
                Title            = p.Title,
                Brief            = p.Brief,
                Date             = p.PostDate.ToString("dd.MM.yyyy"),
                CategoryName     = p.Category?.Title,
                Image            = p.Image,
                YoutubeVideoCode = p.YoutubeVideoCode,
                Url              = blogPage.GetUrl() + "/details/" + p.Id,
                Published        = p.Published
            }));
            return(vm);
        }
Beispiel #4
0
 /// <summary>Static getter for URL part substitution</summary>
 public static string GetUmbracoUrlName(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("umbracoUrlName"));
 }
Beispiel #5
0
 /// <summary>Static getter for Redirect to page</summary>
 public static object GetUmbracoRedirect(IAbstractPage that)
 {
     return(that.GetPropertyValue("umbracoRedirect"));
 }
Beispiel #6
0
 /// <summary>Static getter for Hide from Menu</summary>
 public static bool GetUmbracoNaviHide(IAbstractPage that)
 {
     return(that.GetPropertyValue <bool>("umbracoNaviHide"));
 }
Beispiel #7
0
 /// <summary>Static getter for Redirect to first sub-page</summary>
 public static bool GetRedirectFirstSubPage(IAbstractPage that)
 {
     return(that.GetPropertyValue <bool>("redirectFirstSubPage"));
 }
Beispiel #8
0
 /// <summary>Static getter for Title Override</summary>
 public static string GetOverrideTitle(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("overrideTitle"));
 }
Beispiel #9
0
 /// <summary>Static getter for Hide from Footer</summary>
 public static bool GetHideFromFooter(IAbstractPage that)
 {
     return(that.GetPropertyValue <bool>("hideFromFooter"));
 }
Beispiel #10
0
 /// <summary>Static getter for Browser Title Override</summary>
 public static string GetBrowserTitleOverride(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("browserTitleOverride"));
 }
Beispiel #11
0
 /// <summary>Static getter for Alternate Page Title for Menus</summary>
 public static string GetAltTitleMenu(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("altTitleMenu"));
 }
Beispiel #12
0
 /// <summary>Static getter for Alternate Internal Page Title</summary>
 public static string GetAltTitleInternal(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("altTitleInternal"));
 }
Beispiel #13
0
 /// <summary>Static getter for Alternate Breadcrumb Page Title</summary>
 public static string GetAltTitleBreadcrumb(IAbstractPage that)
 {
     return(that.GetPropertyValue <string>("altTitleBreadcrumb"));
 }
Beispiel #14
0
 internal static void SetCurrentPage(string stringType) => AbstractPage = PageByField(stringType);
        public static Boolean checkTheEstimateResultsOnPage(AssertionPairs assertionPairs, IAbstractPage page)
        {
            Boolean   hasNoFalseResult = true;
            ArrayList list             = assertionPairs.getAssertionPairs();

            foreach (AssertionPair assertionPair in list)
            {
                if (!page.checkTheEstimateWindow(assertionPair.getVariable(), assertionPair.getValue()))
                {
                    hasNoFalseResult = false;
                    break;
                }
            }

            return(hasNoFalseResult);
        }