using System; using System.ComponentModel; namespace VEPROMS.CSLA.Library { [Serializable] [TypeConverter(typeof(ExpandableObjectConverter))] public class ROImageConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged { #region DynamicTypeDescriptor internal override bool IsReadOnly { get { return _ROImageInfo == null; } } #endregion #region XML private XMLProperties _Xp; private XMLProperties Xp { get { return _Xp; } } #endregion #region Constructors private ROImageInfo _ROImageInfo; public ROImageConfig(ROImageInfo rOImageInfo) { _ROImageInfo = rOImageInfo; string xml = rOImageInfo.Config; if (xml == string.Empty) xml = ""; _Xp = new XMLProperties(xml); } public ROImageConfig() { string xml = ""; _Xp = new XMLProperties(xml); } internal string GetValue(string group, string item) { return _Xp[group, item]; } #endregion #region Local Properties [Category("Image")] [Browsable(false)] [DisplayName("Size")] [RefreshProperties(RefreshProperties.All)] [Description("Size")] public string Image_Size { get { return _Xp["Image", "Size"]; } set { _Xp["Image", "Size"] = value; OnPropertyChanged("Image_Size"); } } #endregion #region ToString public override string ToString() { string s = _Xp.ToString(); if (s == "" || s == "") return string.Empty; return s; } #endregion } }