日期:2014-05-17 浏览次数:21122 次
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ProjectTableItem:IDisposable
ColorProperty m_cp;
public ColorProperty 颜色
{
get
{
if (m_cp == null)
m_cp = new ColorProperty("0x000000");
return m_cp;
}
set { m_cp = value; }
}
[TypeConverter(typeof(ColorPropertyConverter))]
public class ColorProperty
{
string colorstr = "0x000000";
public string 颜色值
{
get
{
if (colorstr.Length != 8)
colorstr = "0x000000";
return colorstr;
}
set
{
if(value.Length==8)
colorstr = value;
}