FixTransitionText
This commit is contained in:
parent
39ef8f06a1
commit
0ff065de42
@ -6,6 +6,7 @@ using Csla.Data;
|
||||
using System.Xml;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -15,6 +16,18 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
return string.Format("{0} {1}", Number, Text);
|
||||
}
|
||||
public void FixTransitionText(TransitionInfo tran)
|
||||
{
|
||||
string transText = tran.ResolvePathTo();
|
||||
string lookFor = string.Format(@"<START\]\\v0 (.*?)\\v #Link:Transition.*?:{0} {1}.*?\[END>", tran.TranType, tran.TransitionID);
|
||||
Match m = Regex.Match(Text, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[1];
|
||||
if (g.ToString() != transText)
|
||||
Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
public partial class ContentInfo
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user