📄 moderationsummary.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Web;
using CommunityServer.Components;
namespace CommunityServer.Components {
/// <summary>
/// Summary description for ModerationSummary.
/// </summary>
public class ModerationSummary {
Hashtable collection = null;
int total = 0;
public ModerationSummary () {
collection = new Hashtable();
}
#region Properties
public Hashtable Collection {
get {
return collection;
}
set {
collection = value;
}
}
public int this [ModeratorActions key] {
get {
try {
return (int) collection[key];
}
catch {
return 0;
}
}
set {
collection[key] = value;
total += value;
}
}
public int UpdatedTotal {
get {
int updatedTotal = 0;
if (collection != null) {
IDictionaryEnumerator iterator = collection.GetEnumerator();
while (iterator.MoveNext()) {
if (iterator.Value != null)
updatedTotal += (int) iterator.Value;
}
}
return updatedTotal;
}
}
public int Total {
get {
return total;
}
}
public bool HasActions {
get { return (this.Total > 0 ? true : false); }
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -