WCNCKL: added length of smart template HLS (for wrapping)
WCNCKL: Set length of smart template HLS (for wrapping) Moved ‘SplitText’ from vlnSvgPageHelper so that it can be accessible from DisplayText (Volian.Controls.Library) and VlnSvgPageHelper (print) Calvert: use item’s format to determine if change id tab should be visible rather than top folder (top folder was used when user was prompted to enter change id for session). WCNCKL: use ‘SplitText’ to handle split/wrap of HLS checklist text
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Drawing;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Volian.Base.Library;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -121,11 +122,21 @@ namespace Volian.Controls.Library
|
||||
if (OriginalText.Contains("Prerequisite"))
|
||||
OriginalText = Regex.Replace(OriginalText, @"\\{Prerequisite Step: .*?\\}", "");
|
||||
TextFont = itemInfo.GetItemFont();//GetItemFont();
|
||||
// if in print mode, and this is the HLS of a smart template (checklist formats), add a space before and
|
||||
// after the HLS text - this allows for the vertical bar characters to be added.
|
||||
//if (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) Console.WriteLine("here");
|
||||
string addSpace = (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) ? " " : "";
|
||||
string text = prefix + addSpace + OriginalText + addSpace + suffix;
|
||||
// if in print mode, and this is the HLS of a smart template (checklist formats) see if the hls
|
||||
// splits across 2 lines.
|
||||
if (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print)
|
||||
{
|
||||
int hlslen = (int)(itemInfo.FormatStepData.StepPrintData.HLSLength ?? 66);
|
||||
List<string> titleLines = Volian.Base.Library.RtfTools.SplitText(OriginalText, hlslen);
|
||||
if (titleLines.Count > 1)
|
||||
{
|
||||
string tmporig = titleLines[0];
|
||||
for (int ix = 1; ix < titleLines.Count; ix++)
|
||||
tmporig = tmporig + @"\par " + titleLines[ix];
|
||||
OriginalText = tmporig;
|
||||
}
|
||||
}
|
||||
string text = prefix + OriginalText + suffix;
|
||||
_MyFormat = itemInfo.ActiveFormat;
|
||||
|
||||
bool tableShouldBeOutlined = (epMode == E_EditPrintMode.Print || vwMode == E_ViewMode.View || noEdit) &&
|
||||
|
Reference in New Issue
Block a user