Added support for iTextSharp
Changed code that determines line color for thin lines. Temporary fix for "*Resolved Transition Text*" bug Removed Comment
This commit is contained in:
@@ -883,7 +883,13 @@ namespace Volian.Controls.Library
|
||||
if (link.IndexOf("<NewID>") != -1) return text;
|
||||
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
|
||||
// Find the transition
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0) return "*Resolved Transition Text*";
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
|
||||
{
|
||||
// TODO: RHM 20100310
|
||||
_MyItemInfo.MyContent.RefreshContentTransitions();
|
||||
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
|
||||
return "*Resolved Transition Text*";
|
||||
}
|
||||
foreach (TransitionInfo ti in _MyItemInfo.MyContent.ContentTransitions)
|
||||
{
|
||||
if (ti.TransitionID == transitionID)
|
||||
@@ -918,8 +924,6 @@ namespace Volian.Controls.Library
|
||||
if (endLinkIndxV == -1) endLinkIndxV = text.IndexOf(@"\v0", linkIndx); // at end of string
|
||||
int endLinkIndxE = text.IndexOf(@"[END>", linkIndx);
|
||||
int endLinkIndx = (endLinkIndxV < endLinkIndxE) ? endLinkIndxV : endLinkIndxE;
|
||||
if (endLinkIndx == -1)
|
||||
Console.WriteLine("{0},{1},{2},'{3}'", endLinkIndx, linkIndx, text.Length,text.Substring(linkIndx));
|
||||
vte.Link = text.Substring(linkIndx + 6, endLinkIndx - linkIndx - 6); // 6 for #Link:
|
||||
|
||||
string tmptxt = null;
|
||||
@@ -945,7 +949,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (vte.TextAndLink.Contains("(Resolved Transition Text)"))
|
||||
vte.TextAndLink = vte.TextAndLink.Replace("(Resolved Transition Text)", tmptxt);
|
||||
else
|
||||
else
|
||||
if (vte.Text != tmptxt)
|
||||
vte.Text = tmptxt;
|
||||
}
|
||||
|
@@ -1869,27 +1869,6 @@ namespace Volian.Controls.Library
|
||||
//Console.WriteLine("TableWidth = {0}, lineMax = '{1}', myFont = {2}", max, lineMax, myFont);
|
||||
return max;
|
||||
}
|
||||
// OLD - RHM 3-24-2010 public float TableWidth(Font myFont, string txt, bool addBorder)
|
||||
//{
|
||||
// string[] lines = txt.Split("\n".ToCharArray());
|
||||
// float max = 0;
|
||||
// string lineMax = "";
|
||||
// Graphics g = this.CreateGraphics();
|
||||
// PointF pnt = new PointF(0, 0);
|
||||
// foreach (string line in lines)
|
||||
// {
|
||||
// string line2 = (addBorder ? "--" : "") + Regex.Replace(line, @"\\.*? ", ""); // Remove RTF Commands
|
||||
// SizeF siz = g.MeasureString(line2, myFont, pnt, StringFormat.GenericTypographic);
|
||||
// if (siz.Width + _MyStepPanel.MyStepPanelSettings.TableWidthAdjust > max)
|
||||
// {
|
||||
// max = siz.Width + _MyStepPanel.MyStepPanelSettings.TableWidthAdjust;
|
||||
// lineMax = line2;
|
||||
// }
|
||||
// }
|
||||
// //vlnStackTrace.ShowStackLocal("TableWidth", 1, 10);
|
||||
// Console.WriteLine("TableWidth = {0}, lineMax = '{1}', myFont = {2}", max, lineMax, myFont);
|
||||
// return max;
|
||||
//}
|
||||
/// <summary>
|
||||
/// Calculates the table location
|
||||
/// </summary>
|
||||
|
@@ -2292,11 +2292,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public void OutlineTable(bool withBorder)
|
||||
{
|
||||
//if (_MyItemInfo.ItemID == 64671)
|
||||
//{
|
||||
// Console.WriteLine("TABLE");
|
||||
// Console.WriteLine("WIDTH {0}", this.Width);
|
||||
//}
|
||||
if (_MyStepItem != null) // Set the width based upon the contents
|
||||
{
|
||||
int newwidth = (int)_MyStepItem.TableWidth(Font, Text, true);
|
||||
@@ -2371,7 +2366,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
return w;
|
||||
}
|
||||
//private string RemoveLinkComments(string line)
|
||||
internal static string RemoveLinkComments(string line)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
Reference in New Issue
Block a user