using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using Mesnac.Controls.Base; namespace Mesnac.Controls.Feeding { /// /// 组合炭黑回收罐 /// [ToolboxBitmap(typeof(DailyTank), "ICONS.DailyTank.bmp")]//新添加的代码 public partial class CombinedCBRecycle : FeedingControl { #region 事件定义 /// /// 报警事件 /// public event EventHandler OnAlarm; #endregion #region 事件属性 private List _alarmActionList = new List(); public List AlarmActionList { get { return this._alarmActionList; } set { this._alarmActionList = value; this.fan1.AlarmActionList = value; this.spiralFeeder1.AlarmActionList = value; this.spiralFeeder2.AlarmActionList = value; this.onoffValve1.AlarmActionList = value; this.onoffValve2.AlarmActionList = value; this.onoffValve3.AlarmActionList = value; } } #endregion public CombinedCBRecycle() { InitializeComponent(); //订阅事件 this.fan1.OnAlarm += new EventHandler(_OnAlarm); this.spiralFeeder1.OnAlarm += new EventHandler(_OnAlarm); this.spiralFeeder2.OnAlarm += new EventHandler(_OnAlarm); this.onoffValve1.OnAlarm += new EventHandler(_OnAlarm); this.onoffValve2.OnAlarm += new EventHandler(_OnAlarm); this.onoffValve3.OnAlarm += new EventHandler(_OnAlarm); } private void _OnAlarm(object sender, EventArgs e) { //触发事件 if (OnAlarm != null) { OnAlarm(sender, System.EventArgs.Empty); } } private void CombinedCBRecycle_Resize(object sender, EventArgs e) { this.Width = 72; this.Height = 194; } /// /// 压力开关可见性 /// [Description("压力开关可见性"), Category("外观")] public bool PressureSwitchVisible { get { return this.pressureSwitch1.Visible; } set { this.pressureSwitch1.Visible = value; } } /// /// 压力开关动画属性 /// public string PressureSwitchStatusName { get { return this.pressureSwitch1.StatusName; } set { this.pressureSwitch1.StatusName = value; } } /// /// 压力开关状态 /// [Description("压力开关状态"), Category("状态")] public PressureSwitch.Statuses PressureSwitchStatus { get { return this.pressureSwitch1.Status; } set { this.pressureSwitch1.Status = value; } } /// /// 风机动画属性 /// public string FanStatusName { get { return this.fan1.StatusName; } set { this.fan1.StatusName = value; } } /// /// 风机状态 /// [Description("风机状态"), Category("状态")] public Fan.Statuses FanStatus { get { return this.fan1.Status; } set { this.fan1.Status = value; } } /// /// 顶竖管动画属性 /// public string TopTubeStatusName { get { return this.straightTubeV1.StatusName; } set { this.straightTubeV1.StatusName = value; } } /// /// 顶竖管状态 /// [Description("顶竖管状态"), Category("状态")] public StraightTubeV.Statuses TopTubeStatus { get { return this.straightTubeV1.Status; } set { this.straightTubeV1.Status = value; } } /// /// 中上竖管动画属性 /// public string MiddleUpTubeStatusName { get { return this.straightTubeV2.StatusName; } set { this.straightTubeV2.StatusName = value; } } /// /// 中上竖管状态 /// [Description("中上竖管状态"), Category("状态")] public StraightTubeV.Statuses MiddleUpTubeStatus { get { return this.straightTubeV2.Status; } set { this.straightTubeV2.Status = value; } } /// /// 中下竖管动画属性 /// public string MiddleDownTubeStatusName { get { return this.straightTubeV3.StatusName; } set { this.straightTubeV3.StatusName = value; } } /// /// 中下竖管状态 /// [Description("中下竖管状态"), Category("状态")] public StraightTubeV.Statuses MiddleDownTubeStatus { get { return this.straightTubeV3.Status; } set { this.straightTubeV3.Status = value; } } /// /// 底左竖管动画属性 /// public string BottomLeftTubeStatusName { get { return this.straightTubeV4.StatusName; } set { this.straightTubeV4.StatusName = value; } } /// /// 底左竖管状态 /// [Description("底左竖管状态"), Category("状态")] public StraightTubeV.Statuses BottomLeftTubeStatus { get { return this.straightTubeV4.Status; } set { this.straightTubeV4.Status = value; } } /// /// 底右竖管动画属性 /// public string BottomRightTubeStatusName { get { return this.straightTubeV5.StatusName; } set { this.straightTubeV5.StatusName = value; } } /// /// 底右竖管状态 /// [Description("底右竖管状态"), Category("状态")] public StraightTubeV.Statuses BottomRightTubeStatus { get { return this.straightTubeV5.Status; } set { this.straightTubeV5.Status = value; } } /// /// 罐动画属性 /// public string DailyTankStatusName { get { return this.dailyTank1.StatusName; } set { this.dailyTank1.StatusName = value; } } /// /// 罐状态 /// [Description("罐状态"), Category("状态")] public DailyTank.Statuses DailyTankStatus { get { return this.dailyTank1.Status; } set { this.dailyTank1.Status = value; } } /// /// 上螺旋动画属性 /// public string UpSpiralFeederStatusName { get { return this.spiralFeeder1.StatusName; } set { this.spiralFeeder1.StatusName = value; } } /// /// 上螺旋状态 /// [Description("上螺旋状态"), Category("状态")] public SpiralFeeder.Statuses UpSpiralFeederStatus { get { return this.spiralFeeder1.Status; } set { this.spiralFeeder1.Status = value; } } /// /// 下螺旋动画属性 /// public string DownSpiralFeederStatusName { get { return this.spiralFeeder2.StatusName; } set { this.spiralFeeder2.StatusName = value; } } /// /// 下螺旋状态 /// [Description("下螺旋状态"), Category("状态")] public SpiralFeeder.Statuses DownSpiralFeederStatus { get { return this.spiralFeeder2.Status; } set { this.spiralFeeder2.Status = value; } } /// /// 上通断阀动画属性 /// public string UpOnoffStatusName { get { return this.onoffValve1.StatusName; } set { this.onoffValve1.StatusName = value; } } /// /// 上通断阀状态 /// [Description("上通断阀状态"), Category("状态")] public OnoffValve.Statuses UpOnoffStatus { get { return this.onoffValve1.Status; } set { this.onoffValve1.Status = value; } } /// /// 下左通断阀动画属性 /// public string DownLeftOnoffStatusName { get { return this.onoffValve2.StatusName; } set { this.onoffValve2.StatusName = value; } } /// /// 下左通断阀状态 /// [Description("下左通断阀状态"), Category("状态")] public OnoffValve.Statuses DownLeftOnoffStatus { get { return this.onoffValve2.Status; } set { this.onoffValve2.Status = value; } } /// /// 下右通断阀动画属性 /// public string DownRightOnoffStatusName { get { return this.onoffValve3.StatusName; } set { this.onoffValve3.StatusName = value; } } /// /// 下右通断阀状态 /// [Description("下右通断阀状态"), Category("状态")] public OnoffValve.Statuses DownRightOnoffStatus { get { return this.onoffValve3.Status; } set { this.onoffValve3.Status = value; } } #region 报警信息 /// /// 风机报警信息 /// [Description("风机报警信息"), Category("报警")] public string FanAlamValue { get { return this.fan1.AlarmValue; } set { this.fan1.AlarmValue = value; } } /// /// 上螺旋报警信息 /// [Description("上螺旋报警信息"), Category("报警")] public string UpSpiralFeederAlarmValue { get { return this.spiralFeeder1.AlarmValue; } set { this.spiralFeeder1.AlarmValue = value; } } /// /// 下螺旋报警信息 /// [Description("下螺旋报警信息"), Category("报警")] public string DownSpiralFeederAlarmValue { get { return this.spiralFeeder2.AlarmValue; } set { this.spiralFeeder2.AlarmValue = value; } } /// /// 上通断阀报警信息 /// [Description("上通断阀报警信息"), Category("报警")] public string UpOnoffAlarmValue { get { return this.onoffValve1.AlarmValue; } set { this.onoffValve1.AlarmValue = value; } } /// /// 下左通断阀报警信息 /// [Description("下左通断阀报警信息"), Category("报警")] public string DownLeftOnoffAlarmValue { get { return this.onoffValve2.AlarmValue; } set { this.onoffValve2.AlarmValue = value; } } /// /// 下右通断阀报警信息 /// [Description("下右通断阀报警信息"), Category("报警")] public string DownRightOnoffAlarmValue { get { return this.onoffValve3.AlarmValue; } set { this.onoffValve3.AlarmValue = value; } } #endregion } }