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(CombinedDailyTank), "ICONS.DailyTank.bmp")] public partial class CombinedDailyTank : 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.spiralFeeder1.AlarmActionList = value; this.onoffValve1.AlarmActionList = value; } } #endregion #region 字段定义 #endregion public CombinedDailyTank() { InitializeComponent(); this.spiralFeeder1.OnAlarm += new EventHandler(_OnAlarm); this.onoffValve1.OnAlarm += new EventHandler(_OnAlarm); } private void _OnAlarm(object sender, EventArgs e) { //触发事件 if (OnAlarm != null) { OnAlarm(sender, System.EventArgs.Empty); } } private void CombinedDailyTank_Resize(object sender, EventArgs e) { this.Width = 60; this.Height = 175; } #region 共有属性 /// /// 压力开关的可见性 /// public bool PressureSwitchVisible { get { return this.pressureSwitch1.Visible; } set { this.pressureSwitch1.Visible = value; } } /// /// 螺旋给料类型 /// [Description("螺旋给料类型"), Category("状态")] public SpiralFeeder.Types SpiralFeederType { get { return this.spiralFeeder1.Type; } set { this.spiralFeeder1.Type = value; if (value == SpiralFeeder.Types.ttleft) { this.pressureSwitch1.Location = new Point(3, 11); this.straightTubeV2.Location = new Point(27, 0); this.dedust1.Location = new Point(24, 12); this.dailyTank1.Location = new Point(0, 36); this.spiralFeeder1.Location = new Point(6, 132); this.straightTubeV1.Location = new Point(40, 144); this.onoffValve1.Location = new Point(38, 154); } else { this.pressureSwitch1.Location = new Point(13, 11); this.straightTubeV2.Location = new Point(37, 0); this.dedust1.Location = new Point(34, 12); this.dailyTank1.Location = new Point(10, 36); this.spiralFeeder1.Location = new Point(1, 132); this.straightTubeV1.Location = new Point(9, 144); this.onoffValve1.Location = new Point(7, 154); } this.Refresh(); } } /// /// 压力开关动画属性 /// 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 TopTubeStatusName { get { return this.straightTubeV2.StatusName; } set { this.straightTubeV2.StatusName = value; } } /// /// 顶端管的状态 /// [Description("顶端管的状态"), Category("状态")] public StraightTubeV.Statuses TopTubeStatus { get { return this.straightTubeV2.Status; } set { this.straightTubeV2.Status = value; } } /// /// 除尘动画属性 /// public string DedustStatusName { get { return this.dedust1.StatusName; } set { this.dedust1.StatusName = value; } } /// /// 除尘的状态 /// [Description("除尘的状态"), Category("状态")] public Dedust.Statuses DedustStatus { get { return this.dedust1.Status; } set { this.dedust1.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 SpiralFeederStatusName { get { return this.spiralFeeder1.StatusName; } set { this.spiralFeeder1.StatusName = value; } } /// /// 螺旋给料的状态 /// [Description("螺旋给料的状态"), Category("状态")] public SpiralFeeder.Statuses SpiralFeederStatus { get { return this.spiralFeeder1.Status; } set { this.spiralFeeder1.Status = value; } } /// /// 底部管的动画属性 /// public string BottomTubeStatusName { get { return this.straightTubeV1.StatusName; } set { this.straightTubeV1.StatusName = value; } } /// /// 底部管的状态 /// [Description("底部管的状态"), Category("状态")] public StraightTubeV.Statuses BottomTubeStatus { get { return this.straightTubeV1.Status; } set { this.straightTubeV1.Status = value; } } /// /// 通断阀的动画属性 /// public string OnoffValveStatusName { get { return this.onoffValve1.StatusName; } set { this.onoffValve1.StatusName = value; } } /// /// 通断阀的状态 /// [Description("通断阀的状态"), Category("状态")] public OnoffValve.Statuses OnoffValueStatus { get { return this.onoffValve1.Status; } set { this.onoffValve1.Status = value; } } #endregion #region 报警信息属性定义 /// /// 螺旋给料报警信息 /// [Description("螺旋给料报警信息"), Category("报警")] public string SpiralFeederAlarmValue { get { return this.spiralFeeder1.AlarmValue; } set { this.spiralFeeder1.AlarmValue = value; } } /// /// 通断阀报警信息 /// [Description("通断阀报警信息"), Category("报警")] public string OnoffValueAlarmValue { get { return this.onoffValve1.AlarmValue; } set { this.onoffValve1.AlarmValue = value; } } #endregion } }