This commit is contained in:
parent
c302540801
commit
f3bb9786f0
@ -126,9 +126,8 @@ namespace Volian.Controls.Library
|
|||||||
Circle = true;
|
Circle = true;
|
||||||
if (_TabFormat == "o ")
|
if (_TabFormat == "o ")
|
||||||
CheckOff = true;
|
CheckOff = true;
|
||||||
if ((value.ItemID % 25) == 0)
|
|
||||||
ChangeBar = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
ChangeBar = _MyItemInfo.HasChangeBar();
|
||||||
value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
|
value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -784,7 +783,7 @@ namespace Volian.Controls.Library
|
|||||||
_MyStepSectionLayoutData = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData;
|
_MyStepSectionLayoutData = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData;
|
||||||
//// TIMING: DisplayItem.TimeIt("CSLARTB _Layout");
|
//// TIMING: DisplayItem.TimeIt("CSLARTB _Layout");
|
||||||
if (myParentStepItem != null)
|
if (myParentStepItem != null)
|
||||||
SeqLevel = myParentStepItem.SeqLevel + ((myChildRelation == ChildRelation.After || myChildRelation == ChildRelation.Before) && TemporaryFormat.IsSequential(itemInfo) ? 1 : 0);
|
SeqLevel = myParentStepItem.SeqLevel + ((myChildRelation == ChildRelation.After || myChildRelation == ChildRelation.Before) && itemInfo.IsSequential ? 1 : 0);
|
||||||
//// TIMING: DisplayItem.TimeIt("CSLARTB seqLevel");
|
//// TIMING: DisplayItem.TimeIt("CSLARTB seqLevel");
|
||||||
MyItemInfo = itemInfo;
|
MyItemInfo = itemInfo;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ namespace Volian.Controls.Library
|
|||||||
BuildSymbolGallery(sl, galleryContainerSymbolsCM3);
|
BuildSymbolGallery(sl, galleryContainerSymbolsCM3);
|
||||||
}
|
}
|
||||||
SetButtonAndMenuEnabling();
|
SetButtonAndMenuEnabling();
|
||||||
SetStepButtonAndMenuEnabling();
|
|
||||||
_MyLastFormatID = MyItemInfo.ActiveFormat.FormatID;
|
_MyLastFormatID = MyItemInfo.ActiveFormat.FormatID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -287,9 +287,11 @@ namespace Volian.Controls.Library
|
|||||||
btnCMEditTran.Enabled = false;
|
btnCMEditTran.Enabled = false;
|
||||||
btnCMEditRO.Enabled = false;
|
btnCMEditRO.Enabled = false;
|
||||||
}
|
}
|
||||||
|
SetStepButtonAndMenuEnabling();
|
||||||
}
|
}
|
||||||
private void SetStepButtonAndMenuEnabling()
|
private void SetStepButtonAndMenuEnabling()
|
||||||
{
|
{
|
||||||
|
btnInsPgBrk.Checked = false;
|
||||||
// see if manual page break - only available on HLS
|
// see if manual page break - only available on HLS
|
||||||
if (MyItemInfo.IsHigh)
|
if (MyItemInfo.IsHigh)
|
||||||
{
|
{
|
||||||
@ -307,6 +309,7 @@ namespace Volian.Controls.Library
|
|||||||
// if on a procedure or section title, don't allow for insert of ROs or Transitions:
|
// if on a procedure or section title, don't allow for insert of ROs or Transitions:
|
||||||
// disable buttons. Info panels for ROs and Transitions are made invisible in frmVEPROMS.cs
|
// disable buttons. Info panels for ROs and Transitions are made invisible in frmVEPROMS.cs
|
||||||
btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = false;
|
btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = false;
|
||||||
|
this.Refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ namespace Volian.Controls.Library
|
|||||||
int typ = (int)myDisplayItem.MyItemInfo.MyContent.Type;
|
int typ = (int)myDisplayItem.MyItemInfo.MyContent.Type;
|
||||||
if (typ >= 20000)
|
if (typ >= 20000)
|
||||||
{
|
{
|
||||||
if (myDisplayItem.RNOLevel > 0 && IsRNO(myDisplayItem.MyItemInfo)) return "";
|
if (myDisplayItem.RNOLevel > 0 && myDisplayItem.MyItemInfo.IsRNO) return "";
|
||||||
// Step 1: Get TabFormat from Format
|
// Step 1: Get TabFormat from Format
|
||||||
format = _TabFormats[typ % 10000];
|
format = _TabFormats[typ % 10000];
|
||||||
if (format == "<seq>")
|
if (format == "<seq>")
|
||||||
@ -82,45 +82,5 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
public static string TabFormat(ItemInfo item, int seqLevel)
|
|
||||||
{
|
|
||||||
string format = string.Empty;
|
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
if (IsRNO(item)) return "";
|
|
||||||
if ((item.MyContent.Type / 10000) == 2)
|
|
||||||
{
|
|
||||||
// Step 1: Get TabFormat from Format
|
|
||||||
format = _TabFormats[((int)item.MyContent.Type) % 10000];
|
|
||||||
if (format == "<seq>")
|
|
||||||
{
|
|
||||||
format = SeqTabFormat[seqLevel];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return format;
|
|
||||||
}
|
|
||||||
// TODO: Move these to ItemExt.cs as properties
|
|
||||||
public static bool IsHigh(ItemInfo item)
|
|
||||||
{
|
|
||||||
// check to see if ActiveParent is a section
|
|
||||||
if(item.MyContent.Type / 10000 != 2)return false;
|
|
||||||
ItemInfo parent = (ItemInfo)item.ActiveParent;
|
|
||||||
if ((parent.MyContent.Type / 10000) == 1)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public static bool IsSequential(ItemInfo item)
|
|
||||||
{
|
|
||||||
//if (IsHigh(item)) return true;
|
|
||||||
if (((item.MyContent.Type / 10000) == 2) && ((((int)item.MyContent.Type) % 10000) == 0)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public static bool IsRNO(ItemInfo item)
|
|
||||||
{
|
|
||||||
if(item != null)
|
|
||||||
return ((item.ItemPartCount > 0) && (item.ItemParts[0].PartType == E_FromType.RNO));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user