diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs index 412b84db..82240a55 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs @@ -745,9 +745,9 @@ namespace VEPROMS // this.tcSectionProp.BackColor = System.Drawing.Color.Transparent; this.tcSectionProp.CanReorderTabs = true; + this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpGeneral); this.tcSectionProp.Controls.Add(this.tcpFormat); - this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpLibDoc); this.tcSectionProp.Controls.Add(this.tabControlPanel4); this.tcSectionProp.Location = new System.Drawing.Point(274, 10); @@ -1079,6 +1079,7 @@ namespace VEPROMS this.ppCbIncTOC.TabIndex = 51; this.ppCbIncTOC.Text = "Include on Table Of Contents"; this.ppCbIncTOC.UseVisualStyleBackColor = false; + this.ppCbIncTOC.CheckedChanged += new System.EventHandler(this.ppCbIncTOC_CheckedChanged); // // tiAutomation // @@ -1148,7 +1149,7 @@ namespace VEPROMS this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ClientSize = new System.Drawing.Size(950, 459); + this.ClientSize = new System.Drawing.Size(946, 455); this.ControlBox = false; this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.panSectBtns); diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index 425ef2a3..6d025886 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -71,6 +71,15 @@ namespace VEPROMS // Check for the print section num/title config item to determine whether that checkbox should // be checked. ppCbPrnSecNumTitle.Checked = _SectionConfig.SubSection_PH != "N"; + + // check if format has automated table of contents, if so, check if config flag is set that this + // section should be included. + ppCbIncTOC.Enabled = false; + if ((ii.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoTableOfContents) == E_PurchaseOptions.AutoTableOfContents && ii.MyContent.Text.ToUpper() != "TABLE OF CONTENTS") + { + ppCbIncTOC.Enabled = true; + ppCbIncTOC.Checked = _SectionConfig.Section_TOC == "Y"; + } } private void btnSectPropOK_Click(object sender, EventArgs e) @@ -803,6 +812,13 @@ namespace VEPROMS _SectionConfig.SubSection_PH = isEditable ? "Y" : "N"; } + private void ppCbIncTOC_CheckedChanged(object sender, EventArgs e) + { + bool isInToc = ppCbIncTOC.Checked; + if (!_Initializing) + _SectionConfig.Section_TOC = isInToc ? "Y" : "N"; + } + //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //{ // // Get the parent setting