auditsummary.cs

来自「本系统是在asp版《在线文件管理器》的基础上设计制作」· CS 代码 · 共 80 行

CS
80
字号
//------------------------------------------------------------------------------
// <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 AuditSummary.
	/// </summary>
	public class AuditSummary {
		Hashtable collection = null;
        int total = 0;

        public AuditSummary () {
            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 + =
减小字号Ctrl + -
显示快捷键?