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.
92 lines
2.2 KiB
C#
92 lines
2.2 KiB
C#
using DevExpress.Internal.WinApi.Windows.UI.Notifications;
|
|
using DevExpress.XtraLayout.Utils;
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ProductionSystem_UserControl.ExtendedControls
|
|
{
|
|
public partial class MyParaControl2 : System.Windows.Forms.UserControl
|
|
{
|
|
public MyParaControl2()
|
|
{
|
|
InitializeComponent();
|
|
MaximumSize = new Size(480, 50);
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 自定义属性
|
|
|
|
/// <summary>
|
|
/// 参数编码
|
|
/// </summary>
|
|
[Category("自定义属性"), Description("参数编码")]
|
|
public string LblItemCode
|
|
{
|
|
get { return lblItemDesc.Tag?.ToString(); }
|
|
set { lblItemDesc.Tag = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 参数名称
|
|
/// </summary>
|
|
[Category("自定义属性"), Description("参数名称")]
|
|
public string LblItemText
|
|
{
|
|
get { return lblItemDesc.Text; }
|
|
set { lblItemDesc.Text = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 目标值
|
|
/// </summary>
|
|
private string _targetText = "";
|
|
[Category("自定义属性"), Description("目标值")]
|
|
public string TargetText
|
|
{
|
|
get { return txtTargetVal.Text; }
|
|
set
|
|
{
|
|
_targetText = value;
|
|
txtTargetVal.Text = _targetText;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 目标值PLC地址#目标值数据类型
|
|
/// </summary>
|
|
[Category("自定义属性"), Description("目标值PLC地址#目标值数据类型")]
|
|
public string TargetPlcAddressTag
|
|
{
|
|
get { return txtTargetVal.Tag?.ToString(); }
|
|
set { txtTargetVal.Tag = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 目标值是否只读
|
|
/// </summary>
|
|
[Category("自定义属性"), Description("目标值是否只读")]
|
|
public bool TargetValReadOnly
|
|
{
|
|
get { return txtTargetVal.ReadOnly; }
|
|
set { txtTargetVal.ReadOnly = value; }
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
}
|
|
}
|