correct config xml to upper case C
RevisionConfig property on Revision and RevisionInfo classes
This commit is contained in:
parent
1c2c28c625
commit
a57172f22f
@ -25,14 +25,14 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_Document = document;
|
||||
string xml = _Document.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public DocumentConfig(DocumentInfo documentInfo)
|
||||
{
|
||||
_DocumentInfo = documentInfo;
|
||||
string xml = _DocumentInfo.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
internal string GetValue(string group, string item)
|
||||
|
@ -50,7 +50,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_Folder = folder;
|
||||
string xml = _Folder.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (folder.MyFolderInfo.MyParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
@ -91,18 +91,18 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_FolderInfo = folderInfo;
|
||||
string xml = _FolderInfo.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (_FolderInfo.MyParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public FolderConfig(string xml)
|
||||
{
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public FolderConfig()
|
||||
{
|
||||
_Xp = new XMLProperties("<config/>");
|
||||
_Xp = new XMLProperties("<Config/>");
|
||||
}
|
||||
internal string GetValue(string group, string item)
|
||||
{
|
||||
@ -181,7 +181,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
|
||||
|
@ -47,7 +47,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_Procedure = procedure;
|
||||
string xml = procedure.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (procedure.MyProcedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
@ -96,14 +96,14 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_ProcedureInfo = procedureInfo;
|
||||
string xml = procedureInfo.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
_Xp.AncestorLookup = true;
|
||||
if (procedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public ProcedureConfig(string xml)
|
||||
{
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
//public ProcedureConfig()
|
||||
@ -196,7 +196,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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -47,19 +47,19 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_Step = step;
|
||||
string xml = step.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public StepConfig(StepInfo stepInfo)
|
||||
{
|
||||
_StepInfo = stepInfo;
|
||||
string xml = stepInfo.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public StepConfig(string xml)
|
||||
{
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public StepConfig()
|
||||
@ -78,7 +78,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
|
||||
|
@ -16,7 +16,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public UserConfig(string xml)
|
||||
{
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
}
|
||||
public UserConfig()
|
||||
@ -26,7 +26,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;
|
||||
}
|
||||
#region UserCategory // from user.cfg
|
||||
|
@ -338,6 +338,16 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public partial class Revision
|
||||
{
|
||||
private RevisionConfig _MyConfig;
|
||||
public RevisionConfig MyConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_MyConfig == null)
|
||||
_MyConfig = new RevisionConfig(this);
|
||||
return _MyConfig;
|
||||
}
|
||||
}
|
||||
public static Revision GetByItemIDAndRevisionNumber(int itemID, string revisionNumber)
|
||||
{
|
||||
if (!CanGetObject())
|
||||
@ -482,6 +492,16 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public partial class RevisionInfo
|
||||
{
|
||||
private RevisionConfig _MyConfig;
|
||||
public RevisionConfig MyConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_MyConfig == null)
|
||||
_MyConfig = new RevisionConfig(this);
|
||||
return _MyConfig;
|
||||
}
|
||||
}
|
||||
#region new bozo
|
||||
[Serializable()]
|
||||
protected class ItemCriteria
|
||||
|
Loading…
x
Reference in New Issue
Block a user