correct config xml to upper case C

RevisionConfig property on Revision and RevisionInfo classes
This commit is contained in:
Rich
2012-02-15 20:41:34 +00:00
parent 1c2c28c625
commit a57172f22f
7 changed files with 61 additions and 45 deletions

View File

@@ -43,18 +43,12 @@ namespace VEPROMS.CSLA.Library
//}
private Section _Section;
private SectionInfo _SectionInfo;
private static int _SectionConfigUnique = 0;
private static int SectionConfigUnique
{ get { return ++_SectionConfigUnique; } }
private int _MySectionConfigUnique = SectionConfigUnique;
public int MySectionConfigUnique // Absolutely Unique ID - Info
{ get { return _MySectionConfigUnique; } }
public SectionConfig(Section section)
{
_Section = section;
string xml = section.MyContent.Config;
if (xml == string.Empty) xml = "<config/>";
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
if (section.MySectionInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
}
@@ -96,13 +90,13 @@ namespace VEPROMS.CSLA.Library
{
_SectionInfo = sectionInfo;
string xml = sectionInfo.MyContent.Config;
if (xml == string.Empty) xml = "<config/>";
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
if (_SectionInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
}
public SectionConfig(string xml)
{
if (xml == string.Empty) xml = "<config/>";
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public SectionConfig()
@@ -260,7 +254,7 @@ namespace VEPROMS.CSLA.Library
public override string ToString()
{
string s = _Xp.ToString();
if (s == "<config/>" || s == "<config></config>") return string.Empty;
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
return s;
}
#endregion
@@ -285,20 +279,20 @@ namespace VEPROMS.CSLA.Library
if (s == string.Empty)
s = _Xp.ParentValue("Section", "Pagination"); // get the parent value
//If there is no parent value, then use the volian default
//if (s == string.Empty)
//{
// if (MyFormat != null)
// {
// bool rval = MyFormat.MyStepSectionLayoutData.BreakOnSections;
// return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
// }
// else
// {
// bool rval = MyDefaultFormat.MyStepSectionLayoutData.BreakOnSections;
// return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
// }
//}
if (s == string.Empty) return SectionPagination.Continuous;
if (s == string.Empty)
{
if (MyFormat != null)
{
bool rval = MyFormat.MyStepSectionLayoutData.BreakOnSections;
return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
}
else
{
bool rval = MyDefaultFormat.MyStepSectionLayoutData.BreakOnSections;
return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
}
}
return (SectionPagination)int.Parse(s);
}
set
@@ -310,7 +304,7 @@ namespace VEPROMS.CSLA.Library
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
{
bool rval = _Section.MySectionInfo.ActiveFormat.MyStepSectionLayoutData.BreakOnSections;
bool rval = MyFormat.MyStepSectionLayoutData.BreakOnSections;
parval = (rval) ? ((int)(SectionPagination.Separate)).ToString() : ((int)(SectionPagination.Continuous)).ToString();
//parval = ((int)(SectionPagination.Default)).ToString();
}
@@ -325,6 +319,7 @@ namespace VEPROMS.CSLA.Library
}
[Category("View Settings")]
//PROPGRID: Hide Include in Background/Deviation
[Browsable(false)]
[DisplayName("Include in Background/Deviation")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section LinkEnhanced")]
@@ -342,6 +337,7 @@ namespace VEPROMS.CSLA.Library
}
[Category("General")]
//PROPGRID: Hide Include On Table Of Contents
[Browsable(false)]
[DisplayName("Include On Table Of Contents")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section TOC")]
@@ -349,8 +345,7 @@ namespace VEPROMS.CSLA.Library
{
get
{
string tmp = _Xp["Section", "TOC"];
return tmp == null || tmp == "" ? "N" : tmp;
return _Xp["Section", "TOC"];
}
set
{
@@ -360,6 +355,7 @@ namespace VEPROMS.CSLA.Library
}
[Category("Section")]
//PROPGRID: Hide AutoGen
[Browsable(false)]
[DisplayName("Section AutoGen")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section AutoGen")]
@@ -377,6 +373,7 @@ namespace VEPROMS.CSLA.Library
}
[Category("Section")]
//PROPGRID: Hide Subsection PH
[Browsable(false)]
[DisplayName("Section PrintHdr")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section PrintHdr")]
@@ -630,7 +627,6 @@ namespace VEPROMS.CSLA.Library
}
[Category("Format")]
[DisplayName("Checkoff Header Selection")]
[RefreshProperties(RefreshProperties.All)]
[Description("Checkoff Header Selection")]
public int Section_CheckoffHeaderSelection
{