Added other symbol font names (Symbol, VESymb) to IsSymbolFont.
Check for null mySection before checking details on a new node. Error 177 - Hidden property added to use for collapse rather than Visible. Error 173 - Use DeleteItemInfoAndChildren on Cancel of a new ItemInfo.
This commit is contained in:
parent
29e4ffceea
commit
9de2eb9d9a
@ -285,11 +285,11 @@ namespace LBWordLibrary
|
|||||||
return ReplaceSymbolCharacters(GetRangeText(myRange));
|
return ReplaceSymbolCharacters(GetRangeText(myRange));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static string[] SymbolFontName = { "VolianDraw", "WingDings" };
|
private static string[] SymbolFontName = { "VolianDraw", "WingDings", "VESymb", "VESymbFix", "Symbol" };
|
||||||
private static bool IsSymbolFont(string fontName)
|
private static bool IsSymbolFont(string fontName)
|
||||||
{
|
{
|
||||||
foreach (string symbolFont in SymbolFontName)
|
foreach (string symbolFont in SymbolFontName)
|
||||||
if (symbolFont.ToUpper() == fontName.ToUpper())
|
if (fontName.ToUpper().StartsWith(symbolFont.ToUpper()))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ namespace VEPROMS
|
|||||||
VETreeNode vNode = (VETreeNode)args.Node;
|
VETreeNode vNode = (VETreeNode)args.Node;
|
||||||
IVEDrillDownReadOnly veObj = vNode.VEObject;
|
IVEDrillDownReadOnly veObj = vNode.VEObject;
|
||||||
SectionInfo mySection = veObj as SectionInfo;
|
SectionInfo mySection = veObj as SectionInfo;
|
||||||
if (mySection.MyContent.MyEntry != null)
|
if (mySection != null && mySection.MyContent.MyEntry != null)
|
||||||
{
|
{
|
||||||
// if it is a word section, find the DisplayTabItem;
|
// if it is a word section, find the DisplayTabItem;
|
||||||
DisplayTabItem tabItem = tc.GetProcDisplayTabItem(mySection);
|
DisplayTabItem tabItem = tc.GetProcDisplayTabItem(mySection);
|
||||||
|
@ -543,9 +543,15 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Top + (Visible ? Height : 0);
|
return Top + (Hidden ? 0 : Height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private bool _Hidden = false;
|
||||||
|
public bool Hidden
|
||||||
|
{
|
||||||
|
get { return _Hidden; }
|
||||||
|
set { _Hidden = value; Visible = !value; }
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bottom most child
|
/// Bottom most child
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1958,7 +1964,7 @@ namespace Volian.Controls.Library
|
|||||||
foreach (StepItem child in childStepItems)
|
foreach (StepItem child in childStepItems)
|
||||||
{
|
{
|
||||||
if (child.Expanded) child.HideChildren();
|
if (child.Expanded) child.HideChildren();
|
||||||
child.Visible = false;
|
child.Hidden = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1989,7 +1995,7 @@ namespace Volian.Controls.Library
|
|||||||
child.UnhideChildren(expand);
|
child.UnhideChildren(expand);
|
||||||
else if (expand)
|
else if (expand)
|
||||||
child.Expand(expand);
|
child.Expand(expand);
|
||||||
child.Visible = true;
|
child.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2031,7 +2037,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
child.Expand(true);
|
child.Expand(true);
|
||||||
}
|
}
|
||||||
child.Visible = true;
|
child.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -860,7 +860,8 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
p1 = procedure.ItemID;
|
p1 = procedure.ItemID;
|
||||||
}
|
}
|
||||||
if (p1 != -1) Item.Delete(p1);
|
if (p1 != -1)
|
||||||
|
DeleteItemInfoAndChildren(_LastProcedureInfo);// Delete Item and reset Previous and Next
|
||||||
}
|
}
|
||||||
else if (newtype == MenuSelections.ProcedureAfter || newtype == MenuSelections.ProcedureBefore)
|
else if (newtype == MenuSelections.ProcedureAfter || newtype == MenuSelections.ProcedureBefore)
|
||||||
{
|
{
|
||||||
@ -881,7 +882,8 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
p2 = procedure.ItemID;
|
p2 = procedure.ItemID;
|
||||||
}
|
}
|
||||||
if (p2 != -1) Item.Delete(p2);
|
if (p2 != -1)
|
||||||
|
DeleteItemInfoAndChildren(_LastProcedureInfo); // Delete Item and reset Previous and Next
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region InsertSection
|
#region InsertSection
|
||||||
@ -902,7 +904,8 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
s1 = section.ItemID;
|
s1 = section.ItemID;
|
||||||
}
|
}
|
||||||
if (s1 != -1) Item.Delete(s1);
|
if (s1 != -1)
|
||||||
|
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (newtype == MenuSelections.SectionAfter || newtype == MenuSelections.SectionBefore)
|
else if (newtype == MenuSelections.SectionAfter || newtype == MenuSelections.SectionBefore)
|
||||||
@ -923,7 +926,8 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
s2 = section.ItemID;
|
s2 = section.ItemID;
|
||||||
}
|
}
|
||||||
if (s2 != -1) Item.Delete(s2);
|
if (s2 != -1)
|
||||||
|
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region InsertStep
|
#region InsertStep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user