www.pudn.com > PlanBoard.rar > PlanList.cs
using System;
using System.Collections;
using System.Xml;
using System.Xml.Serialization;
namespace PlanBoard
{
///
/// PlanList 的摘要说明。
///
[Serializable()]
public class PlanList
{
public PlanList()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
[XmlArrayItem(ElementName = "PlanInfo", Type = typeof(PlanInfo)), XmlArray(ElementName = "PlanList")]
public ArrayList Plan_List = new ArrayList();//任务列表
public ArrayList this[int level]
{
get
{
ArrayList list = new ArrayList();
foreach(PlanInfo info in Plan_List)
{
if(info.Level == level)
{
list.Add(info);
}
}
return list;
}
}
public PlanInfo this[string item]
{
get
{
foreach(PlanInfo info in Plan_List)
{
if(info.Item == item)
{
return info;
}
}
return null;
}
}
}
}