Added flag for DropCheckOff for specific checkoff/sign-off
Folder/DocVersion Specific Info in Pagelist items
This commit is contained in:
parent
36603d643b
commit
1630834fb6
@ -1803,50 +1803,48 @@ namespace Volian.Print.Library
|
||||
plstr = plstr.Replace(token, un);
|
||||
break;
|
||||
default:
|
||||
//The following code is to be used for Folder & DocVersion specific information.
|
||||
//It was commented out to put on other code, but should be uncommented for specific information.
|
||||
//if (token.Contains(@"SI-")) // folder or working draft specific information.
|
||||
//{
|
||||
// DocVersionConfig dvConfig = new DocVersionConfig(section.MyProcedure.MyDocVersion.Config);
|
||||
// FolderConfig folderConfig = new FolderConfig(section.MyProcedure.MyDocVersion.MyFolder.Config);
|
||||
// if (dvConfig != null || folderConfig != null)
|
||||
// {
|
||||
// int indx = token.IndexOf("-");
|
||||
// int qindx = token.IndexOf("?", indx);
|
||||
// string val = null;
|
||||
// if (qindx == -1)
|
||||
// {
|
||||
// val = GetInheritedSIValue(section.MyProcedure, token.Substring(4, token.Length - 5));
|
||||
// plstr = plstr.Replace(token, val);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// string pstok = token.Substring(indx + 1, qindx - indx - 1);
|
||||
// plstr = GetInheritedSIValue(section.MyProcedure, pstok);
|
||||
// //if (dvConfig != null)
|
||||
// // plstr = dvConfig.GetValue("SI", pstok);
|
||||
// //if ((plstr == null || plstr == "") && folderConfig != null)
|
||||
// // plstr = folderConfig.GetValue("SI", pstok);
|
||||
// // the first part of the string between the ? and ' ' is the other logical
|
||||
// // to see if it's on. If on, just use col and/or row as defined. Otherwise use
|
||||
// // value between = and |.
|
||||
// int sindx2 = token.IndexOf(" ", qindx);
|
||||
// string logcheck = token.Substring(qindx + 1, sindx2 - qindx - 1);
|
||||
// if (PgLogicals.ContainsKey(logcheck))
|
||||
// {
|
||||
// int bindx = token.IndexOf("|", indx);
|
||||
// string newval = token.Substring(sindx2 + 1, bindx - sindx2 - 1);
|
||||
// float col = pageItem.Col ?? 0;
|
||||
// if (newval.ToUpper().Contains("COL"))
|
||||
// {
|
||||
// col = System.Convert.ToInt32(newval.Substring(4));
|
||||
// }
|
||||
// svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
// plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if (token.Contains(@"SI-")) // folder or working draft specific information.
|
||||
{
|
||||
DocVersionConfig dvConfig = new DocVersionConfig(section.MyProcedure.MyDocVersion.Config);
|
||||
FolderConfig folderConfig = new FolderConfig(section.MyProcedure.MyDocVersion.MyFolder.Config);
|
||||
if (dvConfig != null || folderConfig != null)
|
||||
{
|
||||
int indx = token.IndexOf("-");
|
||||
int qindx = token.IndexOf("?", indx);
|
||||
string val = null;
|
||||
if (qindx == -1)
|
||||
{
|
||||
val = GetInheritedSIValue(section.MyProcedure, token.Substring(4, token.Length - 5));
|
||||
plstr = plstr.Replace(token, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
string pstok = token.Substring(indx + 1, qindx - indx - 1);
|
||||
plstr = GetInheritedSIValue(section.MyProcedure, pstok);
|
||||
//if (dvConfig != null)
|
||||
// plstr = dvConfig.GetValue("SI", pstok);
|
||||
//if ((plstr == null || plstr == "") && folderConfig != null)
|
||||
// plstr = folderConfig.GetValue("SI", pstok);
|
||||
// the first part of the string between the ? and ' ' is the other logical
|
||||
// to see if it's on. If on, just use col and/or row as defined. Otherwise use
|
||||
// value between = and |.
|
||||
int sindx2 = token.IndexOf(" ", qindx);
|
||||
string logcheck = token.Substring(qindx + 1, sindx2 - qindx - 1);
|
||||
if (PgLogicals.ContainsKey(logcheck))
|
||||
{
|
||||
int bindx = token.IndexOf("|", indx);
|
||||
string newval = token.Substring(sindx2 + 1, bindx - sindx2 - 1);
|
||||
float col = pageItem.Col ?? 0;
|
||||
if (newval.ToUpper().Contains("COL"))
|
||||
{
|
||||
col = System.Convert.ToInt32(newval.Substring(4));
|
||||
}
|
||||
svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (token.Contains(@"RO-"))
|
||||
{
|
||||
plstr = token.Replace("{","").Replace("}","");
|
||||
@ -1923,30 +1921,28 @@ namespace Volian.Print.Library
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
//The following code is to be used for Folder & DocVersion specific information.
|
||||
//It was commented out to put on other code, but should be uncommented for specific information.
|
||||
//private string GetInheritedSIValue(ProcedureInfo pi, string fieldName)
|
||||
//{
|
||||
// string val = null;
|
||||
// DocVersionConfig dvConfig = new DocVersionConfig(pi.MyDocVersion.Config);
|
||||
// if (dvConfig != null)
|
||||
// {
|
||||
// val = dvConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within the docversion level
|
||||
// }
|
||||
// FolderInfo fi = pi.MyDocVersion.MyFolder;
|
||||
// while (fi != null)
|
||||
// {
|
||||
// FolderConfig folderConfig = new FolderConfig(fi.Config);
|
||||
// if (folderConfig != null)
|
||||
// {
|
||||
// val = folderConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within this folder
|
||||
// }
|
||||
// fi = fi.ActiveParent as FolderInfo;
|
||||
// }
|
||||
// return val;
|
||||
//}
|
||||
private string GetInheritedSIValue(ProcedureInfo pi, string fieldName)
|
||||
{
|
||||
string val = null;
|
||||
DocVersionConfig dvConfig = new DocVersionConfig(pi.MyDocVersion.Config);
|
||||
if (dvConfig != null)
|
||||
{
|
||||
val = dvConfig.GetValue("SI", fieldName);
|
||||
if (val != null && val != "") return val; // the value exists within the docversion level
|
||||
}
|
||||
FolderInfo fi = pi.MyDocVersion.MyFolder;
|
||||
while (fi != null)
|
||||
{
|
||||
FolderConfig folderConfig = new FolderConfig(fi.Config);
|
||||
if (folderConfig != null)
|
||||
{
|
||||
val = folderConfig.GetValue("SI", fieldName);
|
||||
if (val != null && val != "") return val; // the value exists within this folder
|
||||
}
|
||||
fi = fi.ActiveParent as FolderInfo;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
private static ItemInfo ValveGetFirstStep(VEPROMS.CSLA.Library.SectionInfo section)
|
||||
{
|
||||
ItemInfo firstHigh = null;
|
||||
|
@ -2945,10 +2945,11 @@ namespace Volian.Print.Library
|
||||
// on line below (with space in between)
|
||||
if (itemInfo.IsBackgroundStep() && itemInfo.MyTab != null && itemInfo.MyTab.AltPrintTab != null && itemInfo.MyTab.AltPrintTab.Trim() != "")
|
||||
yoff = YOffset = yoff + (2 * SixLinesPerInch);
|
||||
|
||||
CheckOff co = itemInfo.GetCheckOffStep();
|
||||
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text
|
||||
// if dropCheckoff is true, then the checkoff is place on the same of row as the LAST line of text
|
||||
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff;
|
||||
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff
|
||||
|| (co != null && co.DropCheckOff);
|
||||
if (itemInfo.MyContent.MyGrid != null)
|
||||
{
|
||||
int profileDepth1 = ProfileTimer.Push(">>>> Before vlnParagraph.Grid");
|
||||
@ -3211,7 +3212,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckOff co = itemInfo.GetCheckOffStep();
|
||||
if (co != null)
|
||||
{
|
||||
// if this item's content is empty, and the flag is set to 'notonempty', don't print out the
|
||||
|
Loading…
x
Reference in New Issue
Block a user