Exemplo n.º 1
0
        protected override DriverResult Display(MenuCulturePickerPart part, string displayType, dynamic shapeHelper)
        {
            bool   isBrowserCurrent   = _cookieCultureService.isBrowserCurrent();
            string currentCulture     = null;
            var    cookieCultureItems = _cultureService.BuildViewModel(part.ShowBrowser, isBrowserCurrent, out currentCulture);

            return(ContentShape("Parts_CookieCulturePickerMenu", () => shapeHelper.Parts_CookieCulturePickerMenu(Cultures: cookieCultureItems, CurrentCulture: currentCulture)));
        }
Exemplo n.º 2
0
        protected override DriverResult Display(CookieCulturePickerPart part, string displayType, dynamic shapeHelper)
        {
            bool   isBrowserCurrent   = _cookieCultureService.isBrowserCurrent();
            string currentCulture     = null;
            var    cookieCultureItems = _cultureService.BuildViewModel(part.ShowBrowser, isBrowserCurrent, out currentCulture);

            if (part.Style == Styles[1])
            {
                return(ContentShape("Parts_CookieCulturePickerWidget", () => shapeHelper.Parts_DropdownCookieCulturePicker(Cultures: cookieCultureItems, CurrentCulture: currentCulture)));
            }
            else
            {
                return(ContentShape("Parts_CookieCulturePickerWidget", () => shapeHelper.Parts_InlineListCookieCulturePicker(Cultures: cookieCultureItems, CurrentCulture: currentCulture)));
            }
        }