📄 threadset.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Collections;
namespace CommunityServer.Components {
/// <summary>
/// Summary description for UserSet.
/// </summary>
[Serializable]
public class ThreadSet {
ArrayList threads = new ArrayList();
ArrayList announcements = new ArrayList();
int totalRecords = 0;
public int TotalRecords {
get {
return totalRecords;
}
set {
totalRecords = value;
}
}
public ArrayList Threads {
get {
return threads;
}
set
{
threads = value;
}
}
public ArrayList Announcements {
get {
if (announcements.Count > 0)
return announcements;
// Announcements hasn't been asked for
// Split thread and announcements
FilterAnnouncements();
return announcements;
}
set
{
threads = value;
}
}
public bool HasResults {
get {
if (threads.Count > 0)
return true;
return false;
}
}
private void FilterAnnouncements() {
ArrayList _threads = new ArrayList();
foreach (IThread t in threads) {
if (t.IsAnnouncement)
announcements.Add(t);
else
_threads.Add(t);
}
// All done
//
threads = _threads;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -