This commit is contained in:
2012-01-27 12:38:07 +00:00
parent 04ad026896
commit 1ef4a4ff3d
2 changed files with 139 additions and 123 deletions

View File

@@ -63,14 +63,17 @@ namespace VEPROMS
// word type, as long as there is no content yet.
if (ii.HasStepContent || !ii.HasWordContent) tcpLibDoc.Enabled = false;
// if this section has subsections, show the editable data check box. If showing 'editable data',
// the procedures steps are shown in editor (tree view & editor) & printed before any subsections.
// If not showing 'editable data', the steps are not shown in editor or print.
ppCbEditableData.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 1; // subsection.hassections?
// if this section has subsections:
// show the editable data check box. If showing 'editable data', the procedures steps are
// shown in editor (tree view & editor) & printed before any subsections. If not showing
// 'editable data', the steps are not shown in editor or print.
// show the automatic indent checkbox.
ppCbEditableData.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 0;
ppCbAutoIndent.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 0;
// Check for the print section num/title config item to determine whether that checkbox should
// be checked.
ppCbPrnSecNumTitle.Checked = _SectionConfig.SubSection_PH != "N";
ppCbPrnSecNumTitle.Checked = _SectionConfig.Section_PrintHdr != "N";
// check if format has automated table of contents, if so, check if config flag is set that this
// section should be included.
@@ -136,10 +139,9 @@ namespace VEPROMS
break;
}
}
if (isWordSect && !sectinfo.HasWordContent)
if (isWordSect && !sectinfo.HasWordContent && !sectinfo.IsAutoTOCSection)
{
Content cont = Content.Get(sectinfo.MyContent.ContentID);
Byte[] tstbyte = System.Text.Encoding.Default.GetBytes("");
Document doc = Document.MakeDocument(null, tstbyte, null, null); // tstbyte, null, null, null);
Entry entry = cont.MyEntry;
@@ -262,7 +264,8 @@ namespace VEPROMS
ShowAvailableOptionsForSectionType();
// set the section level configs:
ppCbEditableData.Checked = !(_SectionConfig.SubSection_Edit == "N");
ppCbEditableData.Checked = (_SectionConfig.SubSection_Edit == "Y");
ppCbAutoIndent.Checked = (_SectionConfig.SubSection_AutoIndent == "Y");
_Initializing = false;
}
@@ -809,7 +812,7 @@ namespace VEPROMS
{
bool isEditable = ppCbPrnSecNumTitle.Checked;
if (!_Initializing)
_SectionConfig.SubSection_PH = isEditable ? "Y" : "N";
_SectionConfig.Section_PrintHdr = isEditable ? "Y" : "N";
}
private void ppCbIncTOC_CheckedChanged(object sender, EventArgs e)