| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -544,6 +544,11 @@ namespace Volian.Controls.Library
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							btnSpell.Enabled = setting;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							rtabTableGridTools.Visible = 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)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						{
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -697,6 +702,21 @@ namespace Volian.Controls.Library
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									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:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								// disable buttons.  Info panels for ROs and Transitions are made invisible in frmVEPROMS.cs
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								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
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							// and tables.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							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)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								Char kt = 'A'; // start with letter A for KeyTips
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -840,14 +860,14 @@ namespace Volian.Controls.Library
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
										bi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
										bi.Text = sdr.Name;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
										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)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
										{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
											DevComponents.DotNetBar.ButtonItem cmbi = new DevComponents.DotNetBar.ButtonItem("cmbtn" + sd.Type, sd.Type);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
											cmbi.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
											cmbi.Text = sdr.Name;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
											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);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
											cmbtn.SubItems.Add(cmbi);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
										}
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				 
 |