コード例 #1
0
ファイル: SettingController.cs プロジェクト: robin88/wojilu
        public void bindSettings( ForumSetting s )
        {
            String chk = "checked=\"checked\"";
            set( "s.HideShowStats", s.IsHideStats == 1 ? chk : "" );
            set( "s.IsHideTop", s.IsHideTop == 1 ? chk : "" );
            set( "s.IsHideOnline", s.IsHideOnline == 1 ? chk : "" );
            set( "s.IsHideLink", s.IsHideLink == 1 ? chk : "" );

            set( "s.PageSize", dropList( "PageSize", 1, 200, s.PageSize ) );
            set( "s.TopicPageSize", dropList( "TopicPageSize", 1, 200, s.ReplySize ) );
            set( "s.NewDays", dropList( "NewDays", 1, 60, s.NewDays ) );
            set( "s.HomeHotDays", dropList( "HomeHotDays", 1, 365, s.HomeHotDays ) );
            set( "s.HomeImgCount", dropList( "HomeImgCount", 1, 10, s.HomeImgCount ) );
            set( "s.HomeListCount", dropList( "HomeListCount", 1, 20, s.HomeListCount ) );
        }
コード例 #2
0
        public ForumSetting GetSettingsObj()
        {
            if (strUtil.IsNullOrEmpty(this.Settings))
            {
                return(new ForumSetting());
            }

            if (_settings != null)
            {
                return(_settings);
            }

            ForumSetting s = Json.Deserialize <ForumSetting>(this.Settings);

            s.SetDefaultValue();
            _settings = s;

            return(s);
        }
コード例 #3
0
        public virtual void bindSettings( ForumSetting s ) {

            String chk = "checked=\"checked\"";
            set( "s.HideShowStats", s.IsHideStats == 1 ? chk : "" );
            set( "s.IsHideTop", s.IsHideTop == 1 ? chk : "" );
            set( "s.IsHideOnline", s.IsHideOnline == 1 ? chk : "" );
            set( "s.IsHideLink", s.IsHideLink == 1 ? chk : "" );

            set( "s.PageSize", dropList( "PageSize", 1, 200, s.PageSize ) );
            set( "s.TopicPageSize", dropList( "TopicPageSize", 1, 200, s.ReplySize ) );
            set( "s.NewDays", dropList( "NewDays", 1, 60, s.NewDays ) );
            set( "s.HomeHotDays", dropList( "HomeHotDays", 1, 365, s.HomeHotDays ) );
            set( "s.HomeImgCount", dropList( "HomeImgCount", 1, 10, s.HomeImgCount ) );
            set( "s.HomeListCount", dropList( "HomeListCount", 1, 20, s.HomeListCount ) );

            set( "s.MetaKeywords", s.MetaKeywords );
            set( "s.MetaDescription", s.MetaDescription );

            set( "s.ReplyInterval", dropList( "ReplyInterval", 1, 300, s.ReplyInterval ) );

        }