예제 #1
0
        /// <summary>
        /// 绑定数据项到前台
        /// </summary>
        public void BindDataItem(EffectDBEntity EffectDB)
        {
            Hashtable      Puts = new Hashtable();
            TemplateFormat xf   = new TemplateFormat(this);

            xf.PhContent = PhContent;


            DNNGo_DNNGalleryProGame_Slider SliderItem = DNNGo_DNNGalleryProGame_Slider.FindByKeyForEdit(SliderID);

            if (!(SliderItem != null && SliderItem.ID > 0) && !String.IsNullOrEmpty(FriendlyUrl))
            {
                SliderItem = DNNGo_DNNGalleryProGame_Slider.FindItemByFriendlyUrl(FriendlyUrl, Settings_ModuleID);
            }

            //if (SliderItem != null && SliderItem.ID > 0)
            //{
            //    Page.Title = String.Format("{0} - Games", xf.ViewSliderSettingT<String>(SliderItem, "Title", SliderItem.Title));
            //}

            Puts.Add("ThemeName", Settings_EffectThemeName);
            Puts.Add("SliderItem", SliderItem);
            Puts.Add("EffectName", Settings_EffectName);

            Puts.Add("LayerList", EffectDB.Layers ? GetLayerList(SliderItem) : new List <DNNGo_DNNGalleryProGame_Layer>());
            liContent.Text = HttpUtility.HtmlDecode(ViewTemplate(EffectDB, "Layer.html", Puts, xf));
        }
예제 #2
0
        protected new void Page_PreRender(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    TemplateFormat xf = new TemplateFormat(this);

                    DNNGo_DNNGalleryProGame_Slider SliderItem = DNNGo_DNNGalleryProGame_Slider.FindByKeyForEdit(SliderID);

                    if (!(SliderItem != null && SliderItem.ID > 0) && !String.IsNullOrEmpty(FriendlyUrl))
                    {
                        SliderItem = DNNGo_DNNGalleryProGame_Slider.FindItemByFriendlyUrl(FriendlyUrl, Settings_ModuleID);
                    }

                    if (SliderItem != null && SliderItem.ID > 0)
                    {
                        Page.Title = String.Format("{0} - Games", xf.ViewSliderSettingT <String>(SliderItem, "Title", SliderItem.Title));
                    }

                    base.Page_PreRender(sender, e);
                }
            }
            catch (Exception ex) //Module failed to load
            {
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, ex);
            }
        }