This commit is contained in:
2008-11-19 13:56:30 +00:00
parent dd571890fc
commit 155000586d
8 changed files with 203 additions and 56 deletions

View File

@@ -8,9 +8,9 @@ namespace VEPROMS.CSLA.Library
public class DynamicPropertyDescriptor : PropertyDescriptor
{
private PropertyDescriptor _BasePropertyDescriptor;
private DynamicTypeDescriptor _Instance;
private ConfigDynamicTypeDescriptor _Instance;
public DynamicPropertyDescriptor(DynamicTypeDescriptor instance, PropertyDescriptor basePropertyDescriptor)
public DynamicPropertyDescriptor(ConfigDynamicTypeDescriptor instance, PropertyDescriptor basePropertyDescriptor)
: base(basePropertyDescriptor)
{
_Instance = instance;
@@ -34,8 +34,23 @@ namespace VEPROMS.CSLA.Library
{ _BasePropertyDescriptor.SetValue(component, value); }
}
[Serializable()]
public class DynamicTypeDescriptor //: ICustomTypeDescriptor//, ISupportInitialize
public class ConfigDynamicTypeDescriptor //: ICustomTypeDescriptor//, ISupportInitialize
{
#region Events
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(String info)
{
_IsDirty = true;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
private bool _IsDirty = false;
public bool IsDirty
{
get { return _IsDirty; }
set { _IsDirty = value; }
}
#endregion
[NonSerialized]
private PropertyDescriptorCollection dynamicProps;
private bool _IsReadOnly = false;
@@ -44,7 +59,7 @@ namespace VEPROMS.CSLA.Library
get { return _IsReadOnly; }
set { _IsReadOnly = value; }
}
public DynamicTypeDescriptor() { }
public ConfigDynamicTypeDescriptor() { }
#region "TypeDescriptor Implementation"
public String GetClassName()
{ return TypeDescriptor.GetClassName(this, true); }