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.

43 lines
1.2 KiB
C#

using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms;
namespace ProductionSystem_UserControl.CompositeControls
{
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]
public partial class MyGroupControl : UserControl
{
public MyGroupControl()
{
SetStyle(ControlStyles.ContainerControl | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);
}
#region 自定义属性
/// <summary>
/// 编码
/// </summary>
[Category("自定义属性"), Description("编码")]
public string LblGroupCode
{
get { return lblGroupTitle.Tag?.ToString(); }
set { lblGroupTitle.Tag = value; }
}
/// <summary>
/// 标题
/// </summary>
private string _lblGroupTitle = "MyGroupControl";
[Category("自定义属性"), Description("标题")]
public string GroupTitle
{
get { return lblGroupTitle.Text; }
set
{
_lblGroupTitle = value;
lblGroupTitle.Text = _lblGroupTitle;
}
}
#endregion
}
}