Equation Editor interface support

This commit is contained in:
2016-11-17 15:05:15 +00:00
parent 3e212834ea
commit 0b7371367c
26 changed files with 2129 additions and 855 deletions

View File

@@ -492,7 +492,7 @@ namespace VEPROMS.CSLA.Library
{
if (!topType.Inactive)
{
if ((_CurItemInfo.IsInRNO||_CurItemInfo.IsCaution||_CurItemInfo.IsNote) && topType.StepEditData.TypeMenu.RnoMenuItem != null && topType.StepEditData.TypeMenu.RnoMenuItem != "")
if ((_CurItemInfo.IsInRNO || _CurItemInfo.IsCaution || _CurItemInfo.IsNote) && topType.StepEditData.TypeMenu.RnoMenuItem != null && topType.StepEditData.TypeMenu.RnoMenuItem != "")
sds.Add(new StepDataRetval(topType.StepEditData.TypeMenu.RnoMenuItem, Convert.ToInt32(topType.Index)));
else
sds.Add(new StepDataRetval(topType.StepEditData.TypeMenu.MenuItem, Convert.ToInt32(topType.Index)));
@@ -525,13 +525,18 @@ namespace VEPROMS.CSLA.Library
{
if (!topType.Inactive)
{
if ((_CurItemInfo.IsInRNO||_CurItemInfo.IsCaution||_CurItemInfo.IsNote) && topType.StepEditData.TypeMenu.RnoMenuItem != null && topType.StepEditData.TypeMenu.RnoMenuItem != "")
// if equation type && in single column mode, put out the rnomenu list, and skip the AER items
bool singleColEq = (topType.Type.ToUpper().Contains("EQUATION") && _CurItemInfo.ColumnMode == 0);
if ((singleColEq ||_CurItemInfo.IsInRNO || _CurItemInfo.IsCaution || _CurItemInfo.IsNote) && topType.StepEditData.TypeMenu.RnoMenuItem != null && topType.StepEditData.TypeMenu.RnoMenuItem != "")
sds.Add(new StepDataRetval(topType.StepEditData.TypeMenu.RnoMenuItem, Convert.ToInt32(topType.Index)));
else
else if (!singleColEq)
sds.Add(new StepDataRetval(topType.StepEditData.TypeMenu.MenuItem, Convert.ToInt32(topType.Index)));
if (topType.Type == curType) retval = cntitm;
cntitm++;
if (!singleColEq || (singleColEq && topType.StepEditData.TypeMenu.RnoMenuItem != null && topType.StepEditData.TypeMenu.RnoMenuItem != ""))
{
if (topType.Type == curType) retval = cntitm;
cntitm++;
}
}
foreach (StepData sd in StepDataList)
{
@@ -4827,6 +4832,8 @@ namespace VEPROMS.CSLA.Library
{
foreach (StepData stepData in this)
if (stepData.Type == type) return stepData;
//foreach (StepData stepData1 in InheritedList)
// if (stepData1.Type == type) return stepData1;
return null;
}
}
@@ -4836,6 +4843,8 @@ namespace VEPROMS.CSLA.Library
{
foreach (StepData stepData in this)
if (stepData.Index == index) return stepData;
//foreach (StepData stepData1 in InheritedList)
// if (stepData1.Index == index) return stepData1;
return null;
}
}
@@ -4959,6 +4968,57 @@ namespace VEPROMS.CSLA.Library
return null;
}
}
// EmbeddedObject has been commented out, 'Equations' are separate top level items.
// This code was left here in case Equations , and other OLE objects, end up
// under the EmbeddedObject:
// EmbeddedObject has inheritted types that represent OLE objects.
// The first of these is 'Equation'. Another that may be implemented later is Image.
// This is a special case, since only 'Equation' exists on initial development of
// embedded objects, 'skip' the embedded object layer when creating the list and
// go right to the equations.
//private StepData _EmbeddedObject;
//public StepData EmbeddedObject
//{
// get
// {
// if (_EmbeddedObject != null) return _EmbeddedObject;
// foreach (StepData sd in this)
// {
// if (sd.Type == "EmbeddedObject")
// {
// _Equation = sd;
// return sd;
// }
// }
// return null;
// }
//}
private StepData _Equation;
public StepData Equation // equation has a parent of embedded object.
{
get
{
if (_Equation != null) return _Equation;
foreach (StepData sd in this)
{
if (sd.Type == "Equation")
{
_Equation = sd;
return sd;
}
}
//foreach (StepData sdi in InheritedList)
//{
// if (sdi.Type == "Equation")
// {
// _Equation = sdi;
// return sdi;
// }
//}
return null;
}
}
}
#endregion
#region StepLayoutData