CSLA Config cleanup
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using DescriptiveEnum;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -11,22 +7,15 @@ namespace VEPROMS.CSLA.Library
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class RevisionConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
|
||||
{
|
||||
#region DynamicTypeDescriptor
|
||||
internal override bool IsReadOnly
|
||||
{
|
||||
get { return false; }//_Section == null; }
|
||||
}
|
||||
#endregion
|
||||
#region XML
|
||||
private XMLProperties _Xp;
|
||||
private XMLProperties Xp
|
||||
{
|
||||
get { return _Xp; }
|
||||
}
|
||||
#region DynamicTypeDescriptor
|
||||
internal override bool IsReadOnly => false;
|
||||
#endregion
|
||||
#region XML
|
||||
private readonly XMLProperties _Xp;
|
||||
#endregion
|
||||
#region Constructors
|
||||
private Revision _Revision;
|
||||
private RevisionInfo _RevisionInfo;
|
||||
private readonly Revision _Revision;
|
||||
private readonly RevisionInfo _RevisionInfo;
|
||||
[Browsable(false)]
|
||||
public bool ParentLookup
|
||||
{
|
||||
@@ -52,18 +41,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public RevisionConfig()
|
||||
{
|
||||
_Xp = new XMLProperties();
|
||||
}
|
||||
internal string GetValue(string group, string item)
|
||||
{
|
||||
return _Xp[group, item];
|
||||
}
|
||||
#endregion
|
||||
#region Properties and Methods
|
||||
// This is needed for the Data Loader
|
||||
[Category("History")]
|
||||
public RevisionConfig() => _Xp = new XMLProperties();
|
||||
internal string GetValue(string group, string item) => _Xp[group, item];
|
||||
#endregion
|
||||
#region Properties and Methods
|
||||
// This is needed for the Data Loader
|
||||
[Category("History")]
|
||||
[Browsable(false)]
|
||||
[DisplayName("Start Date")]
|
||||
[RefreshProperties(RefreshProperties.All)]
|
||||
@@ -115,9 +98,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