This commit is contained in:
parent
e3131bfff9
commit
4849d4aecf
@ -2782,9 +2782,9 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// first find the new link and determine whether it's RO or transition.
|
// first find the new link and determine whether it's RO or transition.
|
||||||
int indx = Rtf.IndexOf(@"#Link:ReferencedObject:<NewID>");
|
int indx = Rtf.IndexOf(@"#Link:ReferencedObject:<NewID>");
|
||||||
if (indx>0)
|
if (indx > 0)
|
||||||
{
|
{
|
||||||
Match mro = Regex.Match(Rtf.Substring(indx,Rtf.Length-indx), @"([A-Za-z]*):(.*)\[END>");
|
Match mro = Regex.Match(Rtf.Substring(indx, Rtf.Length - indx), @"([A-Za-z]*):(.*)\[END>");
|
||||||
string linkstr = mro.Groups[2].Value;
|
string linkstr = mro.Groups[2].Value;
|
||||||
string[] roparts = linkstr.Split(" ".ToCharArray());
|
string[] roparts = linkstr.Split(" ".ToCharArray());
|
||||||
ContentRoUsage rousg = null;
|
ContentRoUsage rousg = null;
|
||||||
@ -2803,13 +2803,15 @@ namespace Volian.Controls.Library
|
|||||||
MyItemInfo.MyContent.RefreshContentRoUsages();
|
MyItemInfo.MyContent.RefreshContentRoUsages();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Match mt = Regex.Match(Rtf, "Transition.*:.* <NewID>");
|
// Need to look for any 'New' transitions, don't include existing ones.
|
||||||
|
Match mt = Regex.Match(Rtf, @"#Link:Transition:([0-9]+) <NewID> ");
|
||||||
|
if (mt.Length <= 0) mt = Regex.Match(Rtf, @"#Link:TransitionRange:([0-9]+) <NewID> ");
|
||||||
if (mt.Length > 0)
|
if (mt.Length > 0)
|
||||||
{
|
{
|
||||||
indx = mt.Index;
|
indx = mt.Index+6; // get past '#Link:"
|
||||||
Match m = Regex.Match(Rtf.Substring(indx, Rtf.Length - indx), @"([A-Za-z]*):(.*)\[END>");
|
Match m = Regex.Match(Rtf.Substring(indx, Rtf.Length - indx), @"([A-Za-z]*):(.*)\[END>");
|
||||||
bool isSingleTran = true;
|
bool isSingleTran = true;
|
||||||
if (Rtf.Substring(indx,16).IndexOf("TransitionRange")>=0) isSingleTran = false;
|
if (Rtf.Substring(indx, 16).IndexOf("TransitionRange") >= 0) isSingleTran = false;
|
||||||
string linkstr = m.Groups[2].Value;
|
string linkstr = m.Groups[2].Value;
|
||||||
string[] tparts = linkstr.Split(" ".ToCharArray());
|
string[] tparts = linkstr.Split(" ".ToCharArray());
|
||||||
int type = System.Convert.ToInt32(tparts[0]);
|
int type = System.Convert.ToInt32(tparts[0]);
|
||||||
@ -2842,7 +2844,6 @@ namespace Volian.Controls.Library
|
|||||||
ContentTransition ct = itm.MyContent.ContentTransitions.Add(itm1, itm2);
|
ContentTransition ct = itm.MyContent.ContentTransitions.Add(itm1, itm2);
|
||||||
//Console.WriteLine("CT {0},{1},{2},{3}", ct.TransitionID, itm.ItemID, itm.MyContent.MyContentUnique, itm.MyContent.ContentTransitions.Count);
|
//Console.WriteLine("CT {0},{1},{2},{3}", ct.TransitionID, itm.ItemID, itm.MyContent.MyContentUnique, itm.MyContent.ContentTransitions.Count);
|
||||||
ct.TranType = type;
|
ct.TranType = type;
|
||||||
|
|
||||||
if (isSingleTran)
|
if (isSingleTran)
|
||||||
ct.IsRange = 0;
|
ct.IsRange = 0;
|
||||||
else if (tr1 != tr2)
|
else if (tr1 != tr2)
|
||||||
@ -2857,11 +2858,10 @@ namespace Volian.Controls.Library
|
|||||||
itm.Save();
|
itm.Save();
|
||||||
MyItemInfo.MyContent.RefreshContentTransitions();
|
MyItemInfo.MyContent.RefreshContentTransitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dispose2) itm2.Dispose();
|
if (dispose2) itm2.Dispose();
|
||||||
if (dispose1) itm1.Dispose();
|
if (dispose1) itm1.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Rtf;
|
return Rtf;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user