📄 aggregatediscussionrepeater.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CommunityServer.Components;
using CommunityServer.Controls;
using CommunityServer.Discussions.Components;
namespace CommunityServer.Discussions.Controls {
// *********************************************************************
// AggregateDiscussionRepeater
//
/// <summary>
/// Used to display an aggregate list of discussions.
/// </summary>
///
// ********************************************************************/
public class AggregateDiscussionRepeater : Repeater {
#region Member variables and constructor
CSContext csContext = CSContext.Current;
#endregion
protected override void CreateChildControls() {
ThreadSet threadSet = Threads.GetThreads(-1, 0, 25, csContext.User, DateTime.Now.AddYears(-24), SortThreadsBy.LastPost, SortOrder.Descending, ThreadStatus.NotSet, ThreadUsersFilter.All, false, false, false, true);
// Do we have posts to display?
//
if (threadSet.Threads.Count > 0) {
DataSource = threadSet.Threads;
DataBind();
}
}
int sectionID = -1;
public int SectionID {
get { return sectionID; }
set { sectionID = value; }
}
int pageSize = 10;
public int PageSize {
get { return pageSize; }
set { pageSize = value; }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -