Added flag for DropCheckOff for specific checkoff/sign-off

Folder/DocVersion Specific Info in Pagelist items
This commit is contained in:
Kathy Ruffing 2015-05-14 14:42:40 +00:00
parent 36603d643b
commit 1630834fb6
2 changed files with 67 additions and 71 deletions

View File

@ -1803,50 +1803,48 @@ namespace Volian.Print.Library
plstr = plstr.Replace(token, un); plstr = plstr.Replace(token, un);
break; break;
default: default:
//The following code is to be used for Folder & DocVersion specific information. if (token.Contains(@"SI-")) // folder or working draft 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);
// DocVersionConfig dvConfig = new DocVersionConfig(section.MyProcedure.MyDocVersion.Config); if (dvConfig != null || folderConfig != null)
// FolderConfig folderConfig = new FolderConfig(section.MyProcedure.MyDocVersion.MyFolder.Config); {
// if (dvConfig != null || folderConfig != null) int indx = token.IndexOf("-");
// { int qindx = token.IndexOf("?", indx);
// int indx = token.IndexOf("-"); string val = null;
// int qindx = token.IndexOf("?", indx); if (qindx == -1)
// string val = null; {
// if (qindx == -1) val = GetInheritedSIValue(section.MyProcedure, token.Substring(4, token.Length - 5));
// { plstr = plstr.Replace(token, val);
// val = GetInheritedSIValue(section.MyProcedure, token.Substring(4, token.Length - 5)); }
// plstr = plstr.Replace(token, val); else
// } {
// else string pstok = token.Substring(indx + 1, qindx - indx - 1);
// { plstr = GetInheritedSIValue(section.MyProcedure, pstok);
// string pstok = token.Substring(indx + 1, qindx - indx - 1); //if (dvConfig != null)
// plstr = GetInheritedSIValue(section.MyProcedure, pstok); // plstr = dvConfig.GetValue("SI", pstok);
// //if (dvConfig != null) //if ((plstr == null || plstr == "") && folderConfig != null)
// // plstr = dvConfig.GetValue("SI", pstok); // plstr = folderConfig.GetValue("SI", pstok);
// //if ((plstr == null || plstr == "") && folderConfig != null) // the first part of the string between the ? and ' ' is the other logical
// // plstr = folderConfig.GetValue("SI", pstok); // to see if it's on. If on, just use col and/or row as defined. Otherwise use
// // the first part of the string between the ? and ' ' is the other logical // value between = and |.
// // to see if it's on. If on, just use col and/or row as defined. Otherwise use int sindx2 = token.IndexOf(" ", qindx);
// // value between = and |. string logcheck = token.Substring(qindx + 1, sindx2 - qindx - 1);
// int sindx2 = token.IndexOf(" ", qindx); if (PgLogicals.ContainsKey(logcheck))
// 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);
// int bindx = token.IndexOf("|", indx); float col = pageItem.Col ?? 0;
// string newval = token.Substring(sindx2 + 1, bindx - sindx2 - 1); if (newval.ToUpper().Contains("COL"))
// float col = pageItem.Col ?? 0; {
// if (newval.ToUpper().Contains("COL")) col = System.Convert.ToInt32(newval.Substring(4));
// { }
// 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.
// 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-")) if (token.Contains(@"RO-"))
{ {
plstr = token.Replace("{","").Replace("}",""); plstr = token.Replace("{","").Replace("}","");
@ -1923,30 +1921,28 @@ namespace Volian.Print.Library
} }
return retval; return retval;
} }
//The following code is to be used for Folder & DocVersion specific information. private string GetInheritedSIValue(ProcedureInfo pi, string fieldName)
//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);
// string val = null; if (dvConfig != 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
// 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)
// FolderInfo fi = pi.MyDocVersion.MyFolder; {
// while (fi != null) FolderConfig folderConfig = new FolderConfig(fi.Config);
// { if (folderConfig != 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
// val = folderConfig.GetValue("SI", fieldName); }
// if (val != null && val != "") return val; // the value exists within this folder fi = fi.ActiveParent as FolderInfo;
// } }
// fi = fi.ActiveParent as FolderInfo; return val;
// } }
// return val;
//}
private static ItemInfo ValveGetFirstStep(VEPROMS.CSLA.Library.SectionInfo section) private static ItemInfo ValveGetFirstStep(VEPROMS.CSLA.Library.SectionInfo section)
{ {
ItemInfo firstHigh = null; ItemInfo firstHigh = null;

View File

@ -2945,10 +2945,11 @@ namespace Volian.Print.Library
// on line below (with space in between) // on line below (with space in between)
if (itemInfo.IsBackgroundStep() && itemInfo.MyTab != null && itemInfo.MyTab.AltPrintTab != null && itemInfo.MyTab.AltPrintTab.Trim() != "") if (itemInfo.IsBackgroundStep() && itemInfo.MyTab != null && itemInfo.MyTab.AltPrintTab != null && itemInfo.MyTab.AltPrintTab.Trim() != "")
yoff = YOffset = yoff + (2 * SixLinesPerInch); yoff = YOffset = yoff + (2 * SixLinesPerInch);
CheckOff co = itemInfo.GetCheckOffStep();
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text 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 // 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) if (itemInfo.MyContent.MyGrid != null)
{ {
int profileDepth1 = ProfileTimer.Push(">>>> Before vlnParagraph.Grid"); int profileDepth1 = ProfileTimer.Push(">>>> Before vlnParagraph.Grid");
@ -3211,7 +3212,6 @@ namespace Volian.Print.Library
} }
} }
} }
CheckOff co = itemInfo.GetCheckOffStep();
if (co != null) if (co != null)
{ {
// if this item's content is empty, and the flag is set to 'notonempty', don't print out the // if this item's content is empty, and the flag is set to 'notonempty', don't print out the