Added logic to allow grouping of sections that are defined in the format docsyle to automatically be included on the Table of Contents

This commit is contained in:
2016-04-22 17:51:01 +00:00
parent 267e315a1c
commit b7f4423ca1

View File

@@ -384,11 +384,17 @@ namespace VEPROMS
if ((pf.FormatData.PurchaseOptions & E_PurchaseOptions.AutoTableOfContents) == E_PurchaseOptions.AutoTableOfContents && _SectionConfig.MySection.MyContent.Text.ToUpper() != "TABLE OF CONTENTS")
{
ppCbIncTOC.Enabled = true;
if (_SectionConfig.MySection.MySectionInfo.MyDocStyle.IncludeInTOC)
ppCbIncTOC.Text = "Exclude from Table of Contents";
else
ppCbIncTOC.Text = "Include in Table of Contents";
ppCbIncTOC.Checked = _SectionConfig.Section_TOC == "Y";
if (_SectionConfig.MySection.MySectionInfo.MyDocStyle.IncludeInTOC)
{
ppCbIncTOC.Text = "Exclude from Table of Contents";
gpTOC.Visible = !ppCbIncTOC.Checked; // show grouping box if including on auto TOC
}
else
{
ppCbIncTOC.Text = "Include in Table of Contents";
gpTOC.Visible = ppCbIncTOC.Checked; // show grouping box if including on auto TOC
}
}
if (!_SectionConfig.MySection.MySectionInfo.IsStepSection)
cbKeepWordDocMargins.Checked = _SectionConfig.Section_WordMargin == "Y";
@@ -1104,7 +1110,7 @@ namespace VEPROMS
}
private void ppCbIncTOC_CheckedChanged(object sender, EventArgs e)
{
bool isInToc = ppCbIncTOC.Checked;
bool isInToc = (_SectionConfig.MySection.MySectionInfo.MyDocStyle.IncludeInTOC) ? !ppCbIncTOC.Checked : ppCbIncTOC.Checked;
if (!_Initializing)
_SectionConfig.Section_TOC = isInToc ? "Y" : "N";
gpTOC.Visible = isInToc;