You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Controls/Mesnac.Controls.Feeding/CombinedCBRecycle.cs

370 lines
12 KiB
C#

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
{
/// <summary>
/// 组合炭黑回收罐
/// </summary>
[ToolboxBitmap(typeof(DailyTank), "ICONS.DailyTank.bmp")]//新添加的代码
public partial class CombinedCBRecycle : FeedingControl
{
#region 事件定义
/// <summary>
/// 报警事件
/// </summary>
public event EventHandler OnAlarm;
#endregion
#region 事件属性
private List<DesignAction> _alarmActionList = new List<DesignAction>();
public List<DesignAction> 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;
}
/// <summary>
/// 压力开关可见性
/// </summary>
[Description("压力开关可见性"), Category("外观")]
public bool PressureSwitchVisible
{
get { return this.pressureSwitch1.Visible; }
set { this.pressureSwitch1.Visible = value; }
}
/// <summary>
/// 压力开关动画属性
/// </summary>
public string PressureSwitchStatusName
{
get { return this.pressureSwitch1.StatusName; }
set { this.pressureSwitch1.StatusName = value; }
}
/// <summary>
/// 压力开关状态
/// </summary>
[Description("压力开关状态"), Category("状态")]
public PressureSwitch.Statuses PressureSwitchStatus
{
get { return this.pressureSwitch1.Status; }
set { this.pressureSwitch1.Status = value; }
}
/// <summary>
/// 风机动画属性
/// </summary>
public string FanStatusName
{
get { return this.fan1.StatusName; }
set { this.fan1.StatusName = value; }
}
/// <summary>
/// 风机状态
/// </summary>
[Description("风机状态"), Category("状态")]
public Fan.Statuses FanStatus
{
get { return this.fan1.Status; }
set { this.fan1.Status = value; }
}
/// <summary>
/// 顶竖管动画属性
/// </summary>
public string TopTubeStatusName
{
get { return this.straightTubeV1.StatusName; }
set { this.straightTubeV1.StatusName = value; }
}
/// <summary>
/// 顶竖管状态
/// </summary>
[Description("顶竖管状态"), Category("状态")]
public StraightTubeV.Statuses TopTubeStatus
{
get { return this.straightTubeV1.Status; }
set { this.straightTubeV1.Status = value; }
}
/// <summary>
/// 中上竖管动画属性
/// </summary>
public string MiddleUpTubeStatusName
{
get { return this.straightTubeV2.StatusName; }
set { this.straightTubeV2.StatusName = value; }
}
/// <summary>
/// 中上竖管状态
/// </summary>
[Description("中上竖管状态"), Category("状态")]
public StraightTubeV.Statuses MiddleUpTubeStatus
{
get { return this.straightTubeV2.Status; }
set { this.straightTubeV2.Status = value; }
}
/// <summary>
/// 中下竖管动画属性
/// </summary>
public string MiddleDownTubeStatusName
{
get { return this.straightTubeV3.StatusName; }
set { this.straightTubeV3.StatusName = value; }
}
/// <summary>
/// 中下竖管状态
/// </summary>
[Description("中下竖管状态"), Category("状态")]
public StraightTubeV.Statuses MiddleDownTubeStatus
{
get { return this.straightTubeV3.Status; }
set { this.straightTubeV3.Status = value; }
}
/// <summary>
/// 底左竖管动画属性
/// </summary>
public string BottomLeftTubeStatusName
{
get { return this.straightTubeV4.StatusName; }
set { this.straightTubeV4.StatusName = value; }
}
/// <summary>
/// 底左竖管状态
/// </summary>
[Description("底左竖管状态"), Category("状态")]
public StraightTubeV.Statuses BottomLeftTubeStatus
{
get { return this.straightTubeV4.Status; }
set { this.straightTubeV4.Status = value; }
}
/// <summary>
/// 底右竖管动画属性
/// </summary>
public string BottomRightTubeStatusName
{
get { return this.straightTubeV5.StatusName; }
set { this.straightTubeV5.StatusName = value; }
}
/// <summary>
/// 底右竖管状态
/// </summary>
[Description("底右竖管状态"), Category("状态")]
public StraightTubeV.Statuses BottomRightTubeStatus
{
get { return this.straightTubeV5.Status; }
set { this.straightTubeV5.Status = value; }
}
/// <summary>
/// 罐动画属性
/// </summary>
public string DailyTankStatusName
{
get { return this.dailyTank1.StatusName; }
set { this.dailyTank1.StatusName = value; }
}
/// <summary>
/// 罐状态
/// </summary>
[Description("罐状态"), Category("状态")]
public DailyTank.Statuses DailyTankStatus
{
get { return this.dailyTank1.Status; }
set { this.dailyTank1.Status = value; }
}
/// <summary>
/// 上螺旋动画属性
/// </summary>
public string UpSpiralFeederStatusName
{
get { return this.spiralFeeder1.StatusName; }
set { this.spiralFeeder1.StatusName = value; }
}
/// <summary>
/// 上螺旋状态
/// </summary>
[Description("上螺旋状态"), Category("状态")]
public SpiralFeeder.Statuses UpSpiralFeederStatus
{
get { return this.spiralFeeder1.Status; }
set { this.spiralFeeder1.Status = value; }
}
/// <summary>
/// 下螺旋动画属性
/// </summary>
public string DownSpiralFeederStatusName
{
get { return this.spiralFeeder2.StatusName; }
set { this.spiralFeeder2.StatusName = value; }
}
/// <summary>
/// 下螺旋状态
/// </summary>
[Description("下螺旋状态"), Category("状态")]
public SpiralFeeder.Statuses DownSpiralFeederStatus
{
get { return this.spiralFeeder2.Status; }
set { this.spiralFeeder2.Status = value; }
}
/// <summary>
/// 上通断阀动画属性
/// </summary>
public string UpOnoffStatusName
{
get { return this.onoffValve1.StatusName; }
set { this.onoffValve1.StatusName = value; }
}
/// <summary>
/// 上通断阀状态
/// </summary>
[Description("上通断阀状态"), Category("状态")]
public OnoffValve.Statuses UpOnoffStatus
{
get { return this.onoffValve1.Status; }
set { this.onoffValve1.Status = value; }
}
/// <summary>
/// 下左通断阀动画属性
/// </summary>
public string DownLeftOnoffStatusName
{
get { return this.onoffValve2.StatusName; }
set { this.onoffValve2.StatusName = value; }
}
/// <summary>
/// 下左通断阀状态
/// </summary>
[Description("下左通断阀状态"), Category("状态")]
public OnoffValve.Statuses DownLeftOnoffStatus
{
get { return this.onoffValve2.Status; }
set { this.onoffValve2.Status = value; }
}
/// <summary>
/// 下右通断阀动画属性
/// </summary>
public string DownRightOnoffStatusName
{
get { return this.onoffValve3.StatusName; }
set { this.onoffValve3.StatusName = value; }
}
/// <summary>
/// 下右通断阀状态
/// </summary>
[Description("下右通断阀状态"), Category("状态")]
public OnoffValve.Statuses DownRightOnoffStatus
{
get { return this.onoffValve3.Status; }
set { this.onoffValve3.Status = value; }
}
#region 报警信息
/// <summary>
/// 风机报警信息
/// </summary>
[Description("风机报警信息"), Category("报警")]
public string FanAlamValue
{
get { return this.fan1.AlarmValue; }
set { this.fan1.AlarmValue = value; }
}
/// <summary>
/// 上螺旋报警信息
/// </summary>
[Description("上螺旋报警信息"), Category("报警")]
public string UpSpiralFeederAlarmValue
{
get { return this.spiralFeeder1.AlarmValue; }
set { this.spiralFeeder1.AlarmValue = value; }
}
/// <summary>
/// 下螺旋报警信息
/// </summary>
[Description("下螺旋报警信息"), Category("报警")]
public string DownSpiralFeederAlarmValue
{
get { return this.spiralFeeder2.AlarmValue; }
set { this.spiralFeeder2.AlarmValue = value; }
}
/// <summary>
/// 上通断阀报警信息
/// </summary>
[Description("上通断阀报警信息"), Category("报警")]
public string UpOnoffAlarmValue
{
get { return this.onoffValve1.AlarmValue; }
set { this.onoffValve1.AlarmValue = value; }
}
/// <summary>
/// 下左通断阀报警信息
/// </summary>
[Description("下左通断阀报警信息"), Category("报警")]
public string DownLeftOnoffAlarmValue
{
get { return this.onoffValve2.AlarmValue; }
set { this.onoffValve2.AlarmValue = value; }
}
/// <summary>
/// 下右通断阀报警信息
/// </summary>
[Description("下右通断阀报警信息"), Category("报警")]
public string DownRightOnoffAlarmValue
{
get { return this.onoffValve3.AlarmValue; }
set { this.onoffValve3.AlarmValue = value; }
}
#endregion
}
}