using System;
using System.ComponentModel;
namespace VEPROMS.CSLA.Library
{
//C2025-023 - Electronic Procedures - Modifications to PROMS
//new class to handle access of tblAnnotations.Config
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class AnnotationConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
{
private readonly XMLProperties _Xp;
public AnnotationConfig(string xml)
{
if (xml == string.Empty) xml = "";
_Xp = new XMLProperties(xml);
}
public AnnotationConfig() => _Xp = new XMLProperties();
public override string ToString()
{
string s = _Xp.ToString();
if (s == "" || s == "") return string.Empty;
return s;
}
public string GetValue(string group, string item) => _Xp[group, item];
public void SetValue(string group, string item, string newvalue) => _Xp[group, item] = newvalue;
}
}