Add new macro settings to allow for a different checkoff macro when a step element is in single column mode
Logic to support the new macro settings which allows for a different checkoff macro and position when a step element is in single column mode
This commit is contained in:
parent
691f99e291
commit
6d0a14c364
@ -4947,6 +4947,31 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _MacroDef, "@Macro");
|
return LazyLoad(ref _MacroDef, "@Macro");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<string> _SingleColMacroDef;
|
||||||
|
public string SingleColMacroDef
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_Inherited == null) SetupStepInheritance();
|
||||||
|
return LazyLoad(ref _MacroDef, "@SingleColMacro");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private LazyLoad<float?> _MacroXOffSet;
|
||||||
|
public float? MacroXOffSet
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _MacroXOffSet, "@MacroXOffSet");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private LazyLoad<float?> _SingleColWidthAdjust;
|
||||||
|
public float? SingleColWidthAdjust
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _SingleColWidthAdjust, "@SingleColWidthAdjust");
|
||||||
|
}
|
||||||
|
}
|
||||||
private LazyLoad<bool> _LocWithXOff;
|
private LazyLoad<bool> _LocWithXOff;
|
||||||
public bool? LocWithXOff
|
public bool? LocWithXOff
|
||||||
{
|
{
|
||||||
|
@ -2551,7 +2551,18 @@ namespace Volian.Print.Library
|
|||||||
string tabText = mytab == null ? null : mytab.Text.Trim(" .".ToCharArray());
|
string tabText = mytab == null ? null : mytab.Text.Trim(" .".ToCharArray());
|
||||||
int tablen = (tabText == null) ? 0 : (tabText.Length <= 2) ? 0 : tabText.Length - 2;
|
int tablen = (tabText == null) ? 0 : (tabText.Length <= 2) ? 0 : tabText.Length - 2;
|
||||||
if (myMacro.LocWithXOff ?? false) x = mytab == null ? XOffset : ((float)mytab.XOffset + (tablen * (float)mytab.MyFont.CharsToTwips));
|
if (myMacro.LocWithXOff ?? false) x = mytab == null ? XOffset : ((float)mytab.XOffset + (tablen * (float)mytab.MyFont.CharsToTwips));
|
||||||
PartsLeft.Add(new vlnMacro(x, y, myMacro.MacroDef));
|
if (MyItemInfo.MyActiveSection.ColumnMode == 0 && myMacro.SingleColMacroDef != null && myMacro.SingleColMacroDef.Length > 0)
|
||||||
|
{
|
||||||
|
float macroXOffset = myMacro.MacroXOffSet ?? 0;
|
||||||
|
float widthAdj = myMacro.SingleColWidthAdjust ?? 0; // set as negative number in format
|
||||||
|
float rightTextEdge = (itemInfo.IsHigh)? XOffset + Width + mytab.XOffset:this.MyHighLevelParagraph.XOffset + this.MyHighLevelParagraph.Width;
|
||||||
|
x = (macroXOffset > 0) ? macroXOffset : rightTextEdge;
|
||||||
|
if (rightTextEdge > x)
|
||||||
|
Width += widthAdj;
|
||||||
|
PartsRight.Add(new vlnMacro(x, y, myMacro.SingleColMacroDef));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PartsLeft.Add(new vlnMacro(x, y, myMacro.MacroDef));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user