This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
chovy-gm/Flobbster.Windows.Forms/PropertyTable.cs

39 lines
617 B
C#

using System.Collections;
namespace Flobbster.Windows.Forms
{
public class PropertyTable : PropertyBag
{
private Hashtable propValues;
public object this[string key]
{
get
{
return propValues[key];
}
set
{
propValues[key] = value;
}
}
public PropertyTable()
{
propValues = new Hashtable();
}
protected override void OnGetValue(PropertySpecEventArgs e)
{
e.Value = propValues[e.Property.Name];
base.OnGetValue(e);
}
protected override void OnSetValue(PropertySpecEventArgs e)
{
propValues[e.Property.Name] = e.Value;
base.OnSetValue(e);
}
}
}