This commit is contained in:
Kathy Ruffing 2011-08-24 11:45:35 +00:00
parent 70fd72d6f6
commit afebd40e72

View File

@ -19,7 +19,7 @@ namespace VEPROMS.CSLA.Library
public void FixTransitionText(TransitionInfo tran) public void FixTransitionText(TransitionInfo tran)
{ {
string transText = tran.ResolvePathTo(); string transText = tran.ResolvePathTo();
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID); string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID);
//string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1} [0-9]*\[END>", tran.TranType, tran.TransitionID); //string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1} [0-9]*\[END>", tran.TranType, tran.TransitionID);
Match m = Regex.Match(Text, lookFor); Match m = Regex.Match(Text, lookFor);
if (m != null && m.Groups.Count > 1) if (m != null && m.Groups.Count > 1)
@ -31,7 +31,7 @@ namespace VEPROMS.CSLA.Library
// see if there is a grid to update too. // see if there is a grid to update too.
if (tran.MyContent.MyGrid != null) if (tran.MyContent.MyGrid != null)
{ {
string lookForXml = string.Format(@"&lt;START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END&gt;", tran.TranType, tran.TransitionID); string lookForXml = string.Format(@"&lt;START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END&gt;", tran.TranType, tran.TransitionID);
Match mg = Regex.Match(MyGrid.Data, lookForXml); Match mg = Regex.Match(MyGrid.Data, lookForXml);
if (mg != null && mg.Groups.Count > 1) if (mg != null && mg.Groups.Count > 1)
{ {
@ -41,9 +41,9 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
public void FixContentText(RoUsageInfo rousg, ROFSTLookup.rochild roch, ROFstInfo origROFstInfo) // string newvalue) public void FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo) // string newvalue)
{ {
string newvalue = roch.value; string newvalue = value;
string findLink = @"<START\].*?\[END>"; string findLink = @"<START\].*?\[END>";
MatchCollection ms = Regex.Matches(Text, findLink); MatchCollection ms = Regex.Matches(Text, findLink);
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* (.*?)(\\[^v '?\\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>", rousg.ROUsageID); string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* (.*?)(\\[^v '?\\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>", rousg.ROUsageID);
@ -64,7 +64,7 @@ namespace VEPROMS.CSLA.Library
// see if there is a grid to update too. // see if there is a grid to update too.
if (rousg.MyContent.MyGrid != null) if (rousg.MyContent.MyGrid != null)
{ {
if (roch.type == (int)E_ROValueType.Table) // if change in rotable data... if (rotype == (int)E_ROValueType.Table) // if change in rotable data...
{ {
List<string> retlist = origROFstInfo.OnROTableUpdate(this, new ROFstInfoROTableUpdateEventArgs(newvalue, MyGrid.Data)); List<string> retlist = origROFstInfo.OnROTableUpdate(this, new ROFstInfoROTableUpdateEventArgs(newvalue, MyGrid.Data));
if (Text != retlist[0]) Text = retlist[0]; if (Text != retlist[0]) Text = retlist[0];
@ -78,7 +78,7 @@ namespace VEPROMS.CSLA.Library
MatchCollection msg = Regex.Matches(MyGrid.Data, findLinkXml); MatchCollection msg = Regex.Matches(MyGrid.Data, findLinkXml);
foreach (Match mmg in msg) foreach (Match mmg in msg)
{ {
int offset = mmg.Index; int offset = 0; // crashed in substring line below if using mmg.Index; Set to 0 and it worked - KBR.
Match mg = Regex.Match(MyGrid.Data, lookForXml); Match mg = Regex.Match(MyGrid.Data, lookForXml);
if (mg != null && mg.Groups.Count > 1) if (mg != null && mg.Groups.Count > 1)
{ {