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.
256 lines
7.7 KiB
C#
256 lines
7.7 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(CombinedOilWeight), "ICONS.OilWeight.bmp")]//新添加的代码
|
|
public partial class CombinedOilWeight : 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.onoffValve1.AlarmActionList = value;
|
|
this.onoffValve2.AlarmActionList = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
public CombinedOilWeight()
|
|
{
|
|
InitializeComponent();
|
|
//订阅事件
|
|
this.onoffValve1.OnAlarm += new EventHandler(_OnAlarm);
|
|
this.onoffValve2.OnAlarm += new EventHandler(_OnAlarm);
|
|
}
|
|
|
|
private void _OnAlarm(object sender, EventArgs e)
|
|
{
|
|
//触发事件
|
|
if (OnAlarm != null)
|
|
{
|
|
OnAlarm(sender, System.EventArgs.Empty);
|
|
}
|
|
}
|
|
|
|
private void CombinedOilWeight_Resize(object sender, EventArgs e)
|
|
{
|
|
this.Width = 100;
|
|
this.Height = 140;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 油称状态
|
|
/// </summary>
|
|
[Description("油称状态"), Category("状态")]
|
|
public OilWeight.Statuses OilWeightStatus
|
|
{
|
|
get { return this.oilWeight1.Status; }
|
|
set { this.oilWeight1.Status = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称卸料状态动画属性
|
|
/// </summary>
|
|
public string OilWeightActOutStatusName
|
|
{
|
|
get { return this.oilWeight1.ActOutStatusName; }
|
|
set { this.oilWeight1.ActOutStatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称卸料状态
|
|
/// </summary>
|
|
[Description("油称卸料状态"), Category("状态")]
|
|
public OnOffStatuses OilWeightActOutStatus
|
|
{
|
|
get { return this.oilWeight1.ActOutStatus; }
|
|
set { this.oilWeight1.ActOutStatus = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称设定值动画属性
|
|
/// </summary>
|
|
public string OilWeightSetValueName
|
|
{
|
|
get { return this.oilWeight1.SetValueName; }
|
|
set { this.oilWeight1.SetValueName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称设定值
|
|
/// </summary>
|
|
[Description("油称设定值"), Category("值")]
|
|
public double OilWeightSetValue
|
|
{
|
|
get { return this.oilWeight1.SetValue; }
|
|
set { this.oilWeight1.SetValue = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称称量值动画属性
|
|
/// </summary>
|
|
public string OilWeightWeightValueName
|
|
{
|
|
get { return this.oilWeight1.WeightValueName; }
|
|
set { this.oilWeight1.WeightValueName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油称称量值
|
|
/// </summary>
|
|
[Description("油称称量值"), Category("值")]
|
|
public double OilWeightWeightValue
|
|
{
|
|
get { return this.oilWeight1.WeightValue; }
|
|
set { this.oilWeight1.WeightValue = 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 UpTubeStatusName
|
|
{
|
|
get { return this.straightTubeV1.StatusName; }
|
|
set { this.straightTubeV1.StatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 上竖管状态
|
|
/// </summary>
|
|
[Description("上竖管状态"), Category("状态")]
|
|
public StraightTubeV.Statuses UpTubeStatus
|
|
{
|
|
get { return this.straightTubeV1.Status; }
|
|
set { this.straightTubeV1.Status = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油斗动画属性
|
|
/// </summary>
|
|
public string OilHopperStatusName
|
|
{
|
|
get { return this.oilHopper1.StatusName; }
|
|
set { this.oilHopper1.StatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 油斗状态
|
|
/// </summary>
|
|
[Description("油斗状态"), Category("状态")]
|
|
public OilHopper.Statuses OilHopperStatus
|
|
{
|
|
get { return this.oilHopper1.Status; }
|
|
set { this.oilHopper1.Status = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下竖管动画属性
|
|
/// </summary>
|
|
public string DownTubeStatusName
|
|
{
|
|
get { return this.straightTubeV2.StatusName; }
|
|
set { this.straightTubeV2.StatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下竖管状态
|
|
/// </summary>
|
|
[Description("下竖管状态"), Category("状态")]
|
|
public StraightTubeV.Statuses DownTubeStatus
|
|
{
|
|
get { return this.straightTubeV2.Status; }
|
|
set { this.straightTubeV2.Status = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下通断阀动画属性
|
|
/// </summary>
|
|
public string DownOnoffStatusName
|
|
{
|
|
get { return this.onoffValve2.StatusName; }
|
|
set { this.onoffValve2.StatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下通断阀状态
|
|
/// </summary>
|
|
[Description("下通断阀状态"), Category("状态")]
|
|
public OnoffValve.Statuses DownOnoffStatus
|
|
{
|
|
get { return this.onoffValve2.Status; }
|
|
set { this.onoffValve2.Status = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下横管动画属性
|
|
/// </summary>
|
|
public string DownHTubeStatusName
|
|
{
|
|
get { return this.straightTubeH1.StatusName; }
|
|
set { this.straightTubeH1.StatusName = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下横管状态
|
|
/// </summary>
|
|
[Description("下横管状态"), Category("状态")]
|
|
public StraightTubeH.Statuses DownHTubeStatus
|
|
{
|
|
get { return this.straightTubeH1.Status; }
|
|
set { this.straightTubeH1.Status = value; }
|
|
}
|
|
|
|
#region 报警信息
|
|
|
|
/// <summary>
|
|
/// 上通断阀报警信息
|
|
/// </summary>
|
|
[Description("上通断阀报警信息"), Category("报警")]
|
|
public string UpOnoffAlarmValue
|
|
{
|
|
get { return this.onoffValve1.AlarmValue; }
|
|
set { this.onoffValve1.AlarmValue = value; }
|
|
}
|
|
/// <summary>
|
|
/// 下通断阀报警信息
|
|
/// </summary>
|
|
[Description("下通断阀报警信息"), Category("报警")]
|
|
public string DownOnoffAlarmValue
|
|
{
|
|
get { return this.onoffValve2.AlarmValue; }
|
|
set { this.onoffValve2.AlarmValue = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|