B2016-262 & B2016-263: for search results & report, print ‘Equation’ for Document text rather than rtf
Additional functionality for Equation Editor, bring up equation editor tool (from registry setting) on Equation button click B2016-265, print proper size of change bar B2016-261: don’t print extra blank lines for a table/equation/figure after caution/note off many lined step in single column mode
This commit is contained in:
parent
99aa1ac9c5
commit
1ff60597c3
@ -2444,6 +2444,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (IsRtfRaw) return ("Equation");
|
||||||
string str = MyContent.Text;
|
string str = MyContent.Text;
|
||||||
if (MyDocVersion != null)
|
if (MyDocVersion != null)
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,8 @@ using VEPROMS.CSLA.Library;
|
|||||||
using Accentra.Controls;
|
using Accentra.Controls;
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using DevComponents.DotNetBar;
|
using DevComponents.DotNetBar;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@ -1020,12 +1022,44 @@ namespace Volian.Controls.Library
|
|||||||
if (_MyEditItem.MyItemInfo.IsFigure && tabOrFigType.Contains("RO"))
|
if (_MyEditItem.MyItemInfo.IsFigure && tabOrFigType.Contains("RO"))
|
||||||
btnInsRO_Click(sender, e);
|
btnInsRO_Click(sender, e);
|
||||||
}
|
}
|
||||||
|
else if (InsertingEquation(contenttype))
|
||||||
|
{
|
||||||
|
// launch equation editor
|
||||||
|
string EqnEdt = GetEqnEdt();
|
||||||
|
if (EqnEdt == null)
|
||||||
|
MessageBox.Show("Equation Editor is not correctly configured in the registry.", "Warning", MessageBoxButtons.OK);
|
||||||
|
else
|
||||||
|
Process.Start(EqnEdt);
|
||||||
|
_MyEditItem.AddChild((E_FromType)fromtype, contenttype);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_MyEditItem.AddChild((E_FromType)fromtype, contenttype);
|
_MyEditItem.AddChild((E_FromType)fromtype, contenttype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// the following launches the equation editor based on registry setting:
|
||||||
|
private string GetEqnEdt()
|
||||||
|
{
|
||||||
|
string retval = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
RegistryKey key = Registry.ClassesRoot;
|
||||||
|
string rootName = key.Name;
|
||||||
|
string curVer = GetDefaultKeyValue(key.Name + "\\Equation\\CurVer");
|
||||||
|
string clsid = GetDefaultKeyValue(key.Name + "\\" + curVer + "\\CLSID");
|
||||||
|
retval = GetDefaultKeyValue(key.Name + "\\CLSID\\" + clsid + "\\LocalServer32");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
public String GetDefaultKeyValue(String key)
|
||||||
|
{
|
||||||
|
object xxx = null;
|
||||||
|
return Registry.GetValue(key, "", xxx).ToString();
|
||||||
|
}
|
||||||
private EditItem FindStepAfter(string types, int contenttype)
|
private EditItem FindStepAfter(string types, int contenttype)
|
||||||
{
|
{
|
||||||
string[] order = types.Split(",".ToCharArray()); //"29,7,6,22"
|
string[] order = types.Split(",".ToCharArray()); //"29,7,6,22"
|
||||||
@ -1116,6 +1150,21 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
return rtnval;
|
return rtnval;
|
||||||
}
|
}
|
||||||
|
// Equation
|
||||||
|
private bool InsertingEquation(int contenttype)
|
||||||
|
{
|
||||||
|
bool rtnval = false;
|
||||||
|
switch (contenttype)
|
||||||
|
{
|
||||||
|
case 21000:
|
||||||
|
case 21001:
|
||||||
|
case 21002:
|
||||||
|
case 21003:
|
||||||
|
rtnval = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return rtnval;
|
||||||
|
}
|
||||||
private void btnInsBefore_Click(object sender, EventArgs e)
|
private void btnInsBefore_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_MyEditItem.AddSiblingBefore();
|
_MyEditItem.AddSiblingBefore();
|
||||||
@ -1187,7 +1236,7 @@ namespace Volian.Controls.Library
|
|||||||
public void SetButtonAndMenuEnabling(bool docontextmenus)
|
public void SetButtonAndMenuEnabling(bool docontextmenus)
|
||||||
{
|
{
|
||||||
if (_MyStepRTB == null) return;
|
if (_MyStepRTB == null) return;
|
||||||
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText && !MyItemInfo.IsFigure & !MyItemInfo.IsRtfRaw) // want menu enabling for figures & equations
|
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText && !MyItemInfo.IsFigure & !MyItemInfo.IsRtfRaw) // want menu enabling for figures & aations
|
||||||
return; // No need to change menu that does not get used
|
return; // No need to change menu that does not get used
|
||||||
DocVersionInfo dvi = MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
DocVersionInfo dvi = MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
if (dvi == null) return;
|
if (dvi == null) return;
|
||||||
|
@ -105,14 +105,15 @@ namespace Volian.Print.Library
|
|||||||
_MsgAtTop = msgAtTop;
|
_MsgAtTop = msgAtTop;
|
||||||
Messages = new SortedDictionary<float, vlnChangeBarMessage>();
|
Messages = new SortedDictionary<float, vlnChangeBarMessage>();
|
||||||
// if there is an RNO separator, add the separator's height in too.
|
// if there is an RNO separator, add the separator's height in too.
|
||||||
Height = parent.Height * MyPageHelper.YMultiplier + (parent.MyItemInfo.IsFigure?SixLinesPerInch:0);
|
float scale = parent.MyItemInfo.IsRtfRaw ? 0.6f : 1; // use scale for equations (B2016-265)
|
||||||
|
Height = (scale * parent.Height) * MyPageHelper.YMultiplier + (parent.MyItemInfo.IsFigure?SixLinesPerInch:0);
|
||||||
foreach (vlnPrintObject vpo in parent.PartsBelow)
|
foreach (vlnPrintObject vpo in parent.PartsBelow)
|
||||||
{
|
{
|
||||||
if (vpo is vlnRNOSeparator)
|
if (vpo is vlnRNOSeparator)
|
||||||
{
|
{
|
||||||
// see if any of children don't have changebar
|
// see if any of children don't have changebar
|
||||||
if ((vpo as vlnRNOSeparator).ExtendChangeBar)
|
if ((vpo as vlnRNOSeparator).ExtendChangeBar)
|
||||||
_YExtendLine = (vpo.Height + vpo.YOffset - (parent.Height + parent.YOffset)) * MyPageHelper.YMultiplier;
|
_YExtendLine = (vpo.Height + vpo.YOffset - ((scale * parent.Height) + parent.YOffset)) * MyPageHelper.YMultiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (vlnPrintObject vph in parent.PartsAbove)
|
foreach (vlnPrintObject vph in parent.PartsAbove)
|
||||||
|
@ -3723,15 +3723,17 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (yOffRight < yoffRightParent) yOffRight = yoffRightParent;
|
if (yOffRight < yoffRightParent) yOffRight = yoffRightParent;
|
||||||
// find the very bottom Yoffset
|
// find the very bottom Yoffset (don't do this is in single column mode for cautions/notes: B2016-261)
|
||||||
vlnParagraph parentPar = parent;
|
vlnParagraph parentPar = parent;
|
||||||
|
if (!((MyItemInfo.IsCaution || MyItemInfo.IsNote) && itemInfo.RNOLevel == 0))
|
||||||
|
{
|
||||||
while (parentPar != null && parentPar.MyItemInfo.IsStep)
|
while (parentPar != null && parentPar.MyItemInfo.IsStep)
|
||||||
{
|
{
|
||||||
float vb = parentPar.YVeryBottom;
|
float vb = parentPar.YVeryBottom;
|
||||||
if (yOffRight < vb)
|
if (yOffRight < vb) yOffRight = vb;
|
||||||
yOffRight = vb;
|
|
||||||
parentPar = parentPar.MyParent;
|
parentPar = parentPar.MyParent;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool rightLonger = yOffRight > yoff;
|
bool rightLonger = yOffRight > yoff;
|
||||||
if (!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table
|
if (!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user