This commit is contained in:
@@ -515,6 +515,11 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
int stepType = ((int)MyContent.Type) % 10000;
|
||||
StepDataList sdlist = ActiveFormat.PlantFormat.FormatData.StepDataList;
|
||||
if (stepType > sdlist.Count)
|
||||
{
|
||||
Console.WriteLine("Error getting type - contentid = {0}", MyContent.ContentID);
|
||||
return false;
|
||||
}
|
||||
StepData sd = sdlist[stepType];
|
||||
while (sd.Index != 0)
|
||||
{
|
||||
@@ -897,6 +902,60 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get { return _SearchAnnotationType; }
|
||||
}
|
||||
private ProcedureConfig _ProcedureConfig = null;
|
||||
public ProcedureConfig.PrintChangeBar PrintChangeBar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProcedureConfig == null) SetProcedureConfig();
|
||||
return _ProcedureConfig.Print_ChangeBar;
|
||||
}
|
||||
}
|
||||
public ProcedureConfig.PrintChangeBarLoc PrintChangeBarLoc
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProcedureConfig == null) SetProcedureConfig();
|
||||
return _ProcedureConfig.Print_ChangeBarLoc;
|
||||
}
|
||||
}
|
||||
public ProcedureConfig.PrintChangeBarText PrintChangeBarText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProcedureConfig == null) SetProcedureConfig();
|
||||
return _ProcedureConfig.Print_ChangeBarText;
|
||||
}
|
||||
}
|
||||
public string PrintChangeBarUsrMsg1
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProcedureConfig == null) SetProcedureConfig();
|
||||
return _ProcedureConfig.Print_UserCBMess1;
|
||||
}
|
||||
}
|
||||
public string PrintChangeBarUsrMsg2
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ProcedureConfig == null) SetProcedureConfig();
|
||||
return _ProcedureConfig.Print_UserCBMess2;
|
||||
}
|
||||
}
|
||||
private void SetProcedureConfig()
|
||||
{
|
||||
// Walk up tree until find my procedure. Then get its change bar (default will
|
||||
// get inherited information if not set at this level).
|
||||
// Find the procedure level and its config.
|
||||
ItemInfo tmpitm = this;
|
||||
while (tmpitm.MyContent.Type != 0)
|
||||
tmpitm = tmpitm.MyParent;
|
||||
|
||||
ProcedureInfo pi = ProcedureInfo.Get(tmpitm.ItemID);
|
||||
if (pi == null) return;
|
||||
_ProcedureConfig = pi.MyConfig as ProcedureConfig;
|
||||
}
|
||||
public string DisplayText
|
||||
{
|
||||
get { return ConvertToDisplayText(MyContent.Text); }
|
||||
@@ -1128,6 +1187,29 @@ namespace VEPROMS.CSLA.Library
|
||||
return DisplayText.Replace("\u2011", "-").Split(" ,.;:-_".ToCharArray())[0]+ "...";
|
||||
}
|
||||
}
|
||||
#region Change Bar
|
||||
public bool HasChangeBar()
|
||||
{
|
||||
if (this.IsAccPages || this.IsProcedure || this.IsSection) return false;
|
||||
StepInfo si = this as StepInfo;
|
||||
if (si == null) return false;
|
||||
StepConfig sc = si.MyConfig as StepConfig;
|
||||
if (sc == null) return false;
|
||||
// if there is no override & return whether there was a change to the text.
|
||||
if (sc.Step_CBOverride == null)
|
||||
return (DTS > MyProcedure.DTS);
|
||||
else // override is on:
|
||||
{
|
||||
// If the date time stamp says that text was changed so a change bar should exist,
|
||||
// check override to see how change bar controls are set. The override flag can
|
||||
// be either On or Off.
|
||||
if (DTS > MyProcedure.DTS)
|
||||
return (sc.Step_CBOverride == "On");
|
||||
else
|
||||
return (sc.Step_CBOverride == "Off");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region IVEReadOnlyItem
|
||||
PartInfoList _PartInfoList;
|
||||
public System.Collections.IList GetChildren()
|
||||
|
Reference in New Issue
Block a user