CSLA Config cleanup
This commit is contained in:
@@ -7,21 +7,14 @@ namespace VEPROMS.CSLA.Library
|
||||
[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; }
|
||||
}
|
||||
#region DynamicTypeDescriptor
|
||||
internal override bool IsReadOnly => _ROImageInfo == null;
|
||||
#endregion
|
||||
#region XML
|
||||
private readonly XMLProperties _Xp;
|
||||
#endregion
|
||||
#region Constructors
|
||||
private ROImageInfo _ROImageInfo;
|
||||
private readonly ROImageInfo _ROImageInfo;
|
||||
public ROImageConfig(ROImageInfo rOImageInfo)
|
||||
{
|
||||
_ROImageInfo = rOImageInfo;
|
||||
@@ -34,13 +27,10 @@ namespace VEPROMS.CSLA.Library
|
||||
string xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
internal string GetValue(string group, string item)
|
||||
{
|
||||
return _Xp[group, item];
|
||||
}
|
||||
#endregion
|
||||
#region Local Properties
|
||||
[Category("Image")]
|
||||
internal string GetValue(string group, string item) => _Xp[group, item];
|
||||
#endregion
|
||||
#region Local Properties
|
||||
[Category("Image")]
|
||||
[Browsable(false)]
|
||||
[DisplayName("Size")]
|
||||
[RefreshProperties(RefreshProperties.All)]
|
||||
@@ -62,9 +52,8 @@ namespace VEPROMS.CSLA.Library
|
||||
public override string ToString()
|
||||
{
|
||||
string s = _Xp.ToString();
|
||||
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
|
||||
return s;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
return s == "<Config/>" || s == "<Config></Config>" ? string.Empty : s;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user