This commit is contained in:
Kathy Ruffing 2011-02-16 16:07:58 +00:00
parent 1b58295cfe
commit 660bb8ae25

View File

@ -28,6 +28,18 @@ namespace VEPROMS.CSLA.Library
if (g.ToString() != transText)
Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
}
// see if there is a grid to update too.
if (tran.MyContent.MyGrid != null)
{
string lookForXml = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID);
Match mg = Regex.Match(MyGrid.Data, lookForXml);
if (mg != null && mg.Groups.Count > 1)
{
System.Text.RegularExpressions.Group g = mg.Groups[3];
if (g.ToString() != transText)
MyGrid.Data = MyGrid.Data.Substring(0, g.Index) + transText + MyGrid.Data.Substring(g.Index + g.Length);
}
}
}
public void FixContentText(RoUsageInfo rousg, string newvalue)
{
@ -39,6 +51,18 @@ namespace VEPROMS.CSLA.Library
if (g.ToString() != newvalue)
Text = Text.Substring(0, g.Index) + newvalue + Text.Substring(g.Index + g.Length);
}
// see if there is a grid to update too.
if (rousg.MyContent.MyGrid != null)
{
string lookForXml = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* (.*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>", rousg.ROUsageID);
Match mg = Regex.Match(MyGrid.Data, lookForXml);
if (mg != null && mg.Groups.Count > 1)
{
System.Text.RegularExpressions.Group g = mg.Groups[3];
if (g.ToString() != newvalue)
MyGrid.Data = MyGrid.Data.Substring(0, g.Index) + newvalue + MyGrid.Data.Substring(g.Index + g.Length);
}
}
}
}
public partial class ContentInfo