This commit is contained in:
parent
d9ce622a09
commit
4516759585
@ -2481,7 +2481,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
if (ii.DisplayNumber != null && ii.DisplayNumber != "")
|
if (ii.DisplayNumber != null && ii.DisplayNumber != "")
|
||||||
{
|
{
|
||||||
SectionConfig sc = MyActiveSection.MyConfig as SectionConfig;
|
SectionConfig sc = ii.MyConfig as SectionConfig;
|
||||||
if (sc != null && sc.SubSection_AutoIndent == "Y")
|
if (sc != null && sc.SubSection_AutoIndent == "Y")
|
||||||
countlev++;
|
countlev++;
|
||||||
}
|
}
|
||||||
|
@ -2933,6 +2933,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _NullBox, "@NullBox");
|
return LazyLoad(ref _NullBox, "@NullBox");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<bool> _AllowNoteCautionAdd;
|
||||||
|
public bool AllowNoteCautionAdd
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _AllowNoteCautionAdd, "@AllowNoteCautionAdd");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region TopOfPage
|
#region TopOfPage
|
||||||
|
@ -393,6 +393,7 @@ namespace Volian.Controls.Library
|
|||||||
ExpandAsNeeded(itemInfo);
|
ExpandAsNeeded(itemInfo);
|
||||||
if (_SelectedItemInfo == null) _SelectedItemInfo = itemInfo;
|
if (_SelectedItemInfo == null) _SelectedItemInfo = itemInfo;
|
||||||
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset();
|
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset();
|
||||||
|
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) return null;
|
||||||
return _LookupEditItems[itemInfo.ItemID];
|
return _LookupEditItems[itemInfo.ItemID];
|
||||||
}
|
}
|
||||||
private bool _DisplayItemChanging = false;
|
private bool _DisplayItemChanging = false;
|
||||||
|
@ -544,6 +544,11 @@ namespace Volian.Controls.Library
|
|||||||
btnSpell.Enabled = setting;
|
btnSpell.Enabled = setting;
|
||||||
rtabTableGridTools.Visible = setting;
|
rtabTableGridTools.Visible = setting;
|
||||||
btnCMGrid.Enabled = setting;
|
btnCMGrid.Enabled = setting;
|
||||||
|
if (MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AllowNoteCautionAdd)
|
||||||
|
{
|
||||||
|
btnInsNote.Enabled = true;
|
||||||
|
btnInsCaut.Enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void SetButtonAndMenuEnabling(bool docontextmenus)
|
private void SetButtonAndMenuEnabling(bool docontextmenus)
|
||||||
{
|
{
|
||||||
@ -697,6 +702,21 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
|
btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
|
||||||
btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = false;
|
btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = false;
|
||||||
|
// if on a section, allow note/caution. May want to add condition that this is a subsection?
|
||||||
|
if (MyItemInfo.IsSection && MyItemInfo.IsStepSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AllowNoteCautionAdd)
|
||||||
|
{
|
||||||
|
btnInsNote.Enabled = true;
|
||||||
|
btnInsCaut.Enabled = true;
|
||||||
|
btnInsCaut.SubItems.Clear();
|
||||||
|
btnInsNote.SubItems.Clear();
|
||||||
|
if (docontextmenus)
|
||||||
|
{
|
||||||
|
btnCMInsCaution.SubItems.Clear();
|
||||||
|
btnCMInsNote.SubItems.Clear();
|
||||||
|
}
|
||||||
|
GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Caution, MyItemInfo.FormatStepData, btnInsCaut, (int)E_FromType.Caution, btnCMInsCaution, docontextmenus);
|
||||||
|
GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Note, MyItemInfo.FormatStepData, btnInsNote, (int)E_FromType.Note, btnCMInsNote, docontextmenus);
|
||||||
|
}
|
||||||
// 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;
|
||||||
@ -797,7 +817,7 @@ namespace Volian.Controls.Library
|
|||||||
// regardless of whether in the AER or RNO column (set to true). For all types, get both except for figures
|
// regardless of whether in the AER or RNO column (set to true). For all types, get both except for figures
|
||||||
// and tables.
|
// and tables.
|
||||||
bool getall = !(btn.Name == "btnInsFig" || (btn.Name == "btnInsTable"));
|
bool getall = !(btn.Name == "btnInsFig" || (btn.Name == "btnInsTable"));
|
||||||
List<StepDataRetval> sdl = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepGetLevelTypes(getall, sdc, ref cursel, selType.Type, MyItemInfo);
|
List<StepDataRetval> sdl = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepGetLevelTypes(getall, sdc, ref cursel, selType==null?"Section":selType.Type, MyItemInfo);
|
||||||
if (sdl != null && sdl.Count > 0)
|
if (sdl != null && sdl.Count > 0)
|
||||||
{
|
{
|
||||||
Char kt = 'A'; // start with letter A for KeyTips
|
Char kt = 'A'; // start with letter A for KeyTips
|
||||||
@ -840,14 +860,14 @@ namespace Volian.Controls.Library
|
|||||||
bi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
|
bi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
|
||||||
bi.Text = sdr.Name;
|
bi.Text = sdr.Name;
|
||||||
bi.Tag = string.Format("{0} {1}", fromtype, sdr.Index); // index of type to insert it when button is clicked
|
bi.Tag = string.Format("{0} {1}", fromtype, sdr.Index); // index of type to insert it when button is clicked
|
||||||
bi.Checked = (sd.Type == selType.Type);
|
bi.Checked = (selType == null || (sd.Type == selType.Type));
|
||||||
if (docontextmenus)
|
if (docontextmenus)
|
||||||
{
|
{
|
||||||
DevComponents.DotNetBar.ButtonItem cmbi = new DevComponents.DotNetBar.ButtonItem("cmbtn" + sd.Type, sd.Type);
|
DevComponents.DotNetBar.ButtonItem cmbi = new DevComponents.DotNetBar.ButtonItem("cmbtn" + sd.Type, sd.Type);
|
||||||
cmbi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
|
cmbi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
|
||||||
cmbi.Text = sdr.Name;
|
cmbi.Text = sdr.Name;
|
||||||
cmbi.Tag = string.Format("{0} {1}", fromtype, sdr.Index); // index of type to insert it when button is clicked
|
cmbi.Tag = string.Format("{0} {1}", fromtype, sdr.Index); // index of type to insert it when button is clicked
|
||||||
cmbi.Checked = (sd.Type == selType.Type);
|
cmbi.Checked = (selType == null || (sd.Type == selType.Type));
|
||||||
cmbi.Click += new System.EventHandler(btnInsStep_Click);
|
cmbi.Click += new System.EventHandler(btnInsStep_Click);
|
||||||
cmbtn.SubItems.Add(cmbi);
|
cmbtn.SubItems.Add(cmbi);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user