Files
lserp_cs_6.0/其他程序/xNewMyFormDesigner/Codes/ControlProperty.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

139 lines
3.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;
namespace NewMyFormDesigner
{
public class ControlProperty
{
private Control ctr;
public ControlProperty() { }
public ControlProperty(Control _ctr)
{
this.ctr = _ctr;
}
private int top;
[Description("上边距")]
[DisplayName("上边距")]
public int Top
{
get { return top; }
set
{
top = value;
ctr.Top = value;
}
}
private int left;
[Description("左边距")]
[DisplayName("左边距")]
public int Left
{
get { return left; }
set
{
left = value;
ctr.Left = value;
}
}
private int width;
[Description("宽度")]
[DisplayName("宽度")]
public int Width
{
get { return width; }
set
{
width = value;
ctr.Width = value;
}
}
private int height;
[Description("高度")]
[DisplayName("高度")]
public int Height
{
get { return height; }
set
{
height = value;
ctr.Height = value;
}
}
private string groupName;
[Description("分组名称")]
[DisplayName("分组名称")]
public string GroupName
{
get { return groupName; }
set
{
groupName = value;
if (ctr is LabelGroupBox)
ctr.Text = value;
}
}
private string name;
[Description("控件名称")]
[DisplayName("控件名称")]
public string Name
{
get { return name; }
set
{
name = value;
ctr.Name = value;
}
}
private int tabIndex;
[Description("TAB次序")]
[DisplayName("TAB次序")]
public int TabIndex
{
get { return tabIndex; }
set
{
tabIndex = value;
ctr.TabIndex = value;
}
}
private string pageName;
[Description("页面名字")]
[DisplayName("页面名字")]
public string PageName
{
get { return pageName; }
set
{
pageName = value;
}
}
private string pageOrder;
[Description("页面顺序")]
[DisplayName("页面顺序")]
public string PageOrder
{
get { return pageOrder; }
set
{
pageOrder = value;
}
}
}
}