46 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
using System.Text;
 | 
						|
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 XMLProperties _Xp;
 | 
						|
		private XMLProperties Xp
 | 
						|
		{
 | 
						|
			get { return _Xp; }
 | 
						|
		}
 | 
						|
		public AnnotationConfig(string xml)
 | 
						|
		{
 | 
						|
			if (xml == string.Empty) xml = "<Config/>";
 | 
						|
			_Xp = new XMLProperties(xml);
 | 
						|
		}
 | 
						|
 | 
						|
		public AnnotationConfig()
 | 
						|
		{
 | 
						|
			_Xp = new XMLProperties();
 | 
						|
		}
 | 
						|
		public override string ToString()
 | 
						|
		{
 | 
						|
			string s = _Xp.ToString();
 | 
						|
			if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
 | 
						|
			return s;
 | 
						|
		}
 | 
						|
		public string GetValue(string group, string item)
 | 
						|
		{
 | 
						|
			return _Xp[group, item];
 | 
						|
		}
 | 
						|
		public void SetValue(string group, string item, string newvalue)
 | 
						|
		{
 | 
						|
			_Xp[group, item] = newvalue;
 | 
						|
		}
 | 
						|
 | 
						|
	}
 | 
						|
}
 |