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(CombinedCbWeight), "ICONS.CBIMWeight.bmp")]//新添加的代码
public partial class CombinedCbWeight : 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.onoffValve1.AlarmActionList = value;
this.onoffValve2.AlarmActionList = value;
this.onoffValve3.AlarmActionList = value;
this.onoffValve4.AlarmActionList = value;
this.onoffValve5.AlarmActionList = value;
}
}
#endregion
public CombinedCbWeight()
{
InitializeComponent();
//订阅事件
this.onoffValve1.OnAlarm += new EventHandler(_OnAlarm);
this.onoffValve2.OnAlarm += new EventHandler(_OnAlarm);
this.onoffValve3.OnAlarm += new EventHandler(_OnAlarm);
this.onoffValve4.OnAlarm += new EventHandler(_OnAlarm);
this.onoffValve5.OnAlarm += new EventHandler(_OnAlarm);
}
private void _OnAlarm(object sender, EventArgs e)
{
//触发事件
if (OnAlarm != null)
{
OnAlarm(sender, System.EventArgs.Empty);
}
}
private void CombinedCbWeight_Resize(object sender, EventArgs e)
{
this.Width = 98;
this.Height = 159;
}
///
/// 炭黑称状态
///
[Description("炭黑称状态"), Category("状态")]
public CBWeight.Statuses CBWeightStatus
{
get { return this.cbWeight1.Status; }
set { this.cbWeight1.Status = value; }
}
///
/// 炭黑称卸料动画属性
///
public string CBWeightActOutStatusName
{
get { return this.cbWeight1.ActOutStatusName; }
set { this.cbWeight1.ActOutStatusName = value; }
}
///
/// 炭黑称卸料状态
///
[Description("炭黑称卸料状态"), Category("状态")]
public OnOffStatuses CBWeightActOutStatus
{
get { return this.cbWeight1.ActOutStatus; }
set { this.cbWeight1.ActOutStatus = value; }
}
///
/// 炭黑称设定值动画属性
///
public string CBWeightSetValueName
{
get { return this.cbWeight1.SetValueName; }
set { this.cbWeight1.SetValueName = value; }
}
///
/// 炭黑称称量值动画属性
///
public string CBWeightWeightValueName
{
get { return this.cbWeight1.WeightValueName; }
set { this.cbWeight1.WeightValueName = value; }
}
///
/// 炭黑称设定值
///
[Description("炭黑称设定值"), Category("值")]
public double CBWeightSetValue
{
get { return this.cbWeight1.SetValue; }
set { this.cbWeight1.SetValue = value; }
}
///
/// 炭黑称称量值
///
[Description("炭黑称称量值"), Category("值")]
public double CBWeightWeightValue
{
get { return this.cbWeight1.WeightValue; }
set { this.cbWeight1.WeightValue = value; }
}
///
/// 上1通断阀动画属性
///
public string UpOnoff1StatusName
{
get { return this.onoffValve1.StatusName; }
set { this.onoffValve1.StatusName = value; }
}
///
/// 上1通断阀状态
///
[Description("上1通断阀状态"), Category("状态")]
public OnoffValve.Statuses UpOnoff1Status
{
get { return this.onoffValve1.Status; }
set { this.onoffValve1.Status = value; }
}
///
/// 上2通断阀动画属性
///
public string UpOnoff2StatusName
{
get { return this.onoffValve2.StatusName; }
set { this.onoffValve2.StatusName = value; }
}
///
/// 上2通断阀状态
///
[Description("上2通断阀状态"), Category("状态")]
public OnoffValve.Statuses UpOnoff2Status
{
get { return this.onoffValve2.Status; }
set { this.onoffValve2.Status = value; }
}
///
/// 管动画属性
///
public string TubeStatusName
{
get { return this.straightTubeV1.StatusName; }
set { this.straightTubeV1.StatusName = value; }
}
///
/// 管状态
///
[Description("管状态"), Category("状态")]
public StraightTubeV.Statuses TubeStatus
{
get { return this.straightTubeV1.Status; }
set { this.straightTubeV1.Status = value; }
}
///
/// 炭黑检料称动画属性
///
public string CBIMWeightStatusName
{
get { return this.cbimWeight1.StatusName; }
set { this.cbimWeight1.StatusName = value; }
}
///
/// 炭黑检料称状态
///
[Description("炭黑检料称状态"), Category("状态")]
public CBIMWeight.Statuses CBIMWeightStatus
{
get { return this.cbimWeight1.Status; }
set { this.cbimWeight1.Status = value; }
}
///
/// 下1通断阀动画属性
///
public string DownOnoff1StatusName
{
get { return this.onoffValve3.StatusName; }
set { this.onoffValve3.StatusName = value; }
}
///
/// 下1通断阀状态
///
[Description("下1通断阀状态"), Category("状态")]
public OnoffValve.Statuses DownOnoff1Status
{
get { return this.onoffValve3.Status; }
set { this.onoffValve3.Status = value; }
}
///
/// 下2通断阀动画属性
///
public string DownOnoff2StatusName
{
get { return this.onoffValve4.StatusName; }
set { this.onoffValve4.StatusName = value; }
}
///
/// 下2通断阀状态
///
[Description("下2通断阀状态"), Category("状态")]
public OnoffValve.Statuses DownOnoff2Status
{
get { return this.onoffValve4.Status; }
set { this.onoffValve4.Status = value; }
}
///
/// 下3通断阀动画属性
///
public string DownOnoff3StatusName
{
get { return this.onoffValve5.StatusName; }
set { this.onoffValve5.StatusName = value; }
}
///
/// 下3通断阀状态
///
[Description("下3通断阀状态"), Category("状态")]
public OnoffValve.Statuses DownOnoff3Status
{
get { return this.onoffValve5.Status; }
set { this.onoffValve5.Status = value; }
}
///
/// 下横管动画属性
///
public string DownTubeStatusName
{
get { return this.straightTubeH1.StatusName; }
set { this.straightTubeH1.StatusName = value; }
}
///
/// 下横管状态
///
[Description("下横管状态"), Category("状态")]
public StraightTubeH.Statuses DownTubeStatus
{
get { return this.straightTubeH1.Status; }
set { this.straightTubeH1.Status = value; }
}
#region 报警信息
///
/// 上1通断阀报警信息
///
[Description("上1通断阀报警信息"), Category("报警")]
public string UpOnoff1AlarmValue
{
get { return this.onoffValve1.AlarmValue; }
set { this.onoffValve1.AlarmValue = value; }
}
///
/// 上2通断阀报警信息
///
[Description("上2通断阀报警信息"), Category("报警")]
public string UpOnoff2AlarmValue
{
get { return this.onoffValve2.AlarmValue; }
set { this.onoffValve2.AlarmValue = value; }
}
///
/// 下1通断阀报警信息
///
[Description("下1通断阀报警信息"), Category("报警")]
public string DownOnoff1AlarmValue
{
get { return this.onoffValve3.AlarmValue; }
set { this.onoffValve3.AlarmValue = value; }
}
///
/// 下2通断阀报警信息
///
[Description("下2通断阀报警信息"), Category("报警")]
public string DownOnoff2AlarmValue
{
get { return this.onoffValve4.AlarmValue; }
set { this.onoffValve4.AlarmValue = value; }
}
///
/// 下3通断阀报警信息
///
[Description("下3通断阀报警信息"), Category("报警")]
public string DownOnoff3AlarmValue
{
get { return this.onoffValve5.AlarmValue; }
set { this.onoffValve5.AlarmValue = value; }
}
#endregion
}
}