using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Windows.Forms;
namespace Mesnac.Basic
{
///
/// 路径类
///
public class IntakePath
{
#region 字段定义
private int oldStatus = 0;
private List tubes = new List();
private List valves = new List();
#endregion
#region 构造方法
public IntakePath() { }
public IntakePath(IntakePath path)
{
this.tubes.AddRange(path.Tubes);
this.valves.AddRange(path.Valves);
}
#endregion
#region 属性定义
///
/// 路径的原始状态
///
public int OldStatus
{
get { return oldStatus; }
set { oldStatus = value; }
}
///
/// 路径中的管道集合
///
public List Tubes
{
get { return tubes; }
set { tubes = value; }
}
///
/// 路径中阀门集合
///
public List Valves
{
get { return valves; }
set { valves = value; }
}
#endregion
}
///
/// 路径节点
///
public class IntakeNode
{
#region 字段定义
private Control ctl;
private PropertyInfo linkProperty;
private PropertyInfo controlProperty;
#endregion
#region 构造方法
public IntakeNode() { }
public IntakeNode(Control ctl)
{
this.ctl = ctl;
}
public IntakeNode(IntakeNode parent)
{
this.ctl = parent.ctl;
this.linkProperty = parent.linkProperty;
this.controlProperty = parent.controlProperty;
}
public IntakeNode(Control ctl, PropertyInfo linkProperty)
{
this.ctl = ctl;
this.linkProperty = linkProperty;
}
#endregion
#region 属性定义
///
/// 节点控件
///
public Control Ctl
{
get { return ctl; }
set { ctl = value; }
}
///
/// 节点链接属性
///
public PropertyInfo LinkProperty
{
get { return linkProperty; }
set { linkProperty = value; }
}
///
/// 节点控制属性
///
public PropertyInfo ControlProperty
{
get { return controlProperty; }
set { controlProperty = value; }
}
#endregion
}
}