- Added ShortPath Property to ItemInfo
- Added MacroList Added CheckOff data Added CheckOff and ChangeBar Fixed inheritance
This commit is contained in:
@@ -1172,6 +1172,22 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
public string ShortPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : ((DisplayNumber ?? "") == "" ? DisplayText : DisplayNumber));
|
||||
ItemInfo parent = this;
|
||||
while (parent.MyPrevious != null) parent = parent.MyPrevious;
|
||||
if (parent.ItemPartCount == 0)
|
||||
return number;
|
||||
else
|
||||
{
|
||||
PartInfo partInfo = parent.ItemParts[0];
|
||||
return partInfo.MyContent.ContentItems.Items[0].ShortPath + "." + ((E_FromType)partInfo.FromType).ToString().Substring(0,1) + number;
|
||||
}
|
||||
}
|
||||
}
|
||||
public ContentInfo ParentContent
|
||||
{
|
||||
get
|
||||
@@ -1880,6 +1896,49 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Macro List
|
||||
[NonSerialized]
|
||||
protected List<Macro> _MyMacros;
|
||||
protected bool _MacrosSetup = false;
|
||||
public List<Macro> MyMacros
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_MacrosSetup) SetupMacros();
|
||||
return _MyMacros;
|
||||
}
|
||||
set
|
||||
{
|
||||
_MyMacros = value;
|
||||
}
|
||||
}
|
||||
private void SetupMacros()
|
||||
{
|
||||
// see if each macro should be printed based on its attributes and the item we're on.
|
||||
// Attributes to check are NotInRNO, i.e. only add this macro to the result list if
|
||||
// the item is not in the RNO column. Also, Groupings is used to only have the macro if
|
||||
// there are N or more of the type in the grouping.
|
||||
List<Macro> tmp = new List<Macro>();
|
||||
foreach (Macro macro in ActiveFormat.PlantFormat.FormatData.StepDataList[FormatStepType].TabData.MacroList)
|
||||
{
|
||||
bool addToList = true;
|
||||
if (macro.NotInRNO && IsInRNO) addToList = false;
|
||||
if (macro.Grouping != null && macro.Grouping > 0)
|
||||
{
|
||||
int count = 0;
|
||||
ItemInfo ii = FirstSibling;
|
||||
while (ii != null)
|
||||
{
|
||||
if (ii.MyContent.Type == MyContent.Type) count++;
|
||||
ii = ii.NextItem;
|
||||
}
|
||||
if (count < macro.Grouping) addToList = false;
|
||||
}
|
||||
if (addToList) tmp.Add(macro);
|
||||
}
|
||||
if (tmp.Count > 0) _MyMacros = tmp;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion ItemInfo
|
||||
#region Tab
|
||||
|
Reference in New Issue
Block a user