Added properties for IsSubsection, IsSubsectionNumber and IsSeparateSubsection

Improved debug
Calvert: Improved tab on Section Continue Message and print missing Section Continue Message
This commit is contained in:
2014-11-13 15:50:46 +00:00
parent edf38ca662
commit 7d3b8872c8
3 changed files with 50 additions and 10 deletions

View File

@@ -1625,6 +1625,40 @@ namespace VEPROMS.CSLA.Library
return false;
}
}
public bool IsSubsection
{
get
{
if (!IsSection) return false;
ItemInfo par = ActiveParent as ItemInfo;
if (par == null || !par.IsSection) return false;
return true;
}
}
public bool IsSubsectionNumber
{
// returns whether the subsection number is derived from section number,
// for example 6.9 is subsectionnumber of 6.0. B is not a subsectionnumber of 6.9
get
{
if (!IsSection) return false;
ItemInfo par = ActiveParent as ItemInfo;
if (par == null || !par.IsSection) return false;
string parNumber = par.DisplayNumber;
string myNumber = DisplayNumber;
if (parNumber == null || myNumber == null) return false;
if (!parNumber.EndsWith(".0")) return false;
return (myNumber.StartsWith(parNumber.Substring(0, parNumber.Length - 1)));
}
}
public bool IsSeparateSubsection
{
get
{
return (IsSubsection && !IsSubsectionNumber);
}
}
public bool IsFolder
{
get