Use PSI value from a pagelist RO lookup value if the PSI value is enclosed in square brackets.

Force PSI refresh when printing.
This commit is contained in:
Rich 2013-03-26 14:46:03 +00:00
parent 82263e28fb
commit 9709fbac59

View File

@ -713,7 +713,7 @@ namespace Volian.Print.Library
// handle any conditional PS tokens
if (plstr.Contains(@"PS="))
{
ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig;
ProcedureConfig procConfig = new ProcedureConfig(section.MyProcedure.MyContent.Config);
if (procConfig != null)
{
int indx = token.IndexOf("=");
@ -784,12 +784,10 @@ namespace Volian.Print.Library
string accpgid = accpageid;
accpgid = accpgid.Replace("-HIGH", "-HI").Replace("-LOW", "-LO").Replace("_HIGH", "-HI").Replace("_LOW", "-LO").Replace(@"\u8209?", "-");
string val = myLookup.GetROValueByAccPagID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
if (val != null)
if (!deflt.StartsWith("[") && val != null)
{
val = val.Replace("[xB3]", "\xB3");
val = val.Replace("[xB2]", "\xB2");
if (deflt.StartsWith("[") && !val.StartsWith("[")) val = "[" + val + "]";
if (deflt.EndsWith("*")) val = val + "*";
return val;
}
return deflt;
@ -952,7 +950,14 @@ namespace Volian.Print.Library
}
if (token.Contains(@"PS-"))
{
ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig;
//Console.WriteLine("RefreshConfig {0} {1}", section.MyProcedure.ItemID, section.MyProcedure.MyItemInfoUnique);
//section.MyProcedure.RefreshConfig();
//ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig;
//Console.WriteLine("> ProcConfig {0} {1}",procConfig,section.MyProcedure.MyItemInfoUnique);
//Console.WriteLine("> MyContent {0}", section.MyProcedure.MyContent.Config);
//section.MyProcedure.RefreshConfig();
ProcedureConfig procConfig = new ProcedureConfig(section.MyProcedure.MyContent.Config);
//Console.WriteLine("< ProcConfig {0}", procConfig);
if (procConfig != null)
{
int indx = token.IndexOf("-");