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:
@@ -868,7 +868,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (myItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
|
||||
{
|
||||
if (ItemsChangeIds.ContainsKey(myItemInfo.MyProcedure.ItemID)) SetChangeId(ItemsChangeIds[myItemInfo.MyProcedure.ItemID], pg);
|
||||
if (ItemsChangeIds.ContainsKey(myItemInfo.MyProcedure.ItemID)) SetChangeId(ItemsChangeIds[myItemInfo.MyProcedure.ItemID], pg, myItemInfo);
|
||||
else PromptForChangeId(myItemInfo, pg);
|
||||
}
|
||||
}
|
||||
@@ -877,17 +877,17 @@ namespace Volian.Controls.Library
|
||||
dlgChgId dlgCI = new dlgChgId(this);
|
||||
dlgCI.ShowDialog(this);
|
||||
ItemsChangeIds.Add(myItemInfo.MyProcedure.ItemID, ChgId);
|
||||
SetChangeId(ChgId, pg);
|
||||
SetChangeId(ChgId, pg, myItemInfo);
|
||||
}
|
||||
|
||||
private void SetChangeId(string chgid, DisplayTabItem pg)
|
||||
private void SetChangeId(string chgid, DisplayTabItem pg, ItemInfo ii)
|
||||
{
|
||||
if (pg == null || pg.MyStepTabPanel == null)
|
||||
{
|
||||
ChgId = null;
|
||||
return;
|
||||
}
|
||||
pg.MyStepTabPanel.MyStepTabRibbon.SetChangeId(chgid);
|
||||
pg.MyStepTabPanel.MyStepTabRibbon.SetChangeId(chgid, ii);
|
||||
ChgId = chgid;
|
||||
}
|
||||
/// <summary>
|
||||
|
@@ -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) &&
|
||||
|
@@ -63,9 +63,10 @@ namespace Volian.Controls.Library
|
||||
// txtBxChgId.Text = (this.Parent as StepTabPanel).MyDisplayTabControl.ChgId;
|
||||
}
|
||||
}
|
||||
public void SetChangeId(string chgid)
|
||||
public void SetChangeId(string chgid, ItemInfo ii)
|
||||
{
|
||||
txtBxChgId.Text = chgid;
|
||||
rtabChgId.Visible = (ii != null) ? ii.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds : false;
|
||||
}
|
||||
// added jcb 20121221 to support set ro from word doc
|
||||
private ROFSTLookup MyLookup;
|
||||
|
Reference in New Issue
Block a user