This commit is contained in:
@@ -62,27 +62,7 @@ namespace VEPROMS
|
||||
// also disable if there is no word content yet - the user may want to change from step type to
|
||||
// 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.
|
||||
// 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.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.
|
||||
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)
|
||||
@@ -97,6 +77,23 @@ namespace VEPROMS
|
||||
DialogResult = DialogResult.OK;
|
||||
// save the type based on selection.
|
||||
_SectionConfig.MySection.MyContent.Type = ((DocStyle)ppCmbxStyleSectionType.SelectedItem).Index + 10000;
|
||||
|
||||
// save any changes to checkoffs. The bindings were added to the designer, but the 'save' was
|
||||
// hanging, so they're being done here.
|
||||
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
|
||||
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
||||
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && chkoffList.Count > 1)
|
||||
&& (ppCmbxCheckoffType.SelectedIndex != _SectionConfig.Section_CheckoffListSelection - 1))
|
||||
_SectionConfig.Section_CheckoffListSelection = ppCmbxCheckoffType.SelectedIndex + 1;
|
||||
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.Count > 1)
|
||||
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
||||
|
||||
if (ppCmbxSectPagination.SelectedValue == null)
|
||||
_SectionConfig.Section_Pagination = (SectionConfig.SectionPagination)Enum.Parse(typeof(SectionConfig.SectionPagination), _DefaultPaginationStyle);
|
||||
else
|
||||
_SectionConfig.Section_Pagination = (SectionConfig.SectionPagination)ppCmbxSectPagination.SelectedValue;
|
||||
_SectionConfig.MySection.MyContent.Config = _SectionConfig.ToString();
|
||||
Section mySection = _SectionConfig.MySection.Save();
|
||||
FinishSectionSave(mySection);
|
||||
// if there was a document to delete, do it.
|
||||
@@ -177,10 +174,8 @@ namespace VEPROMS
|
||||
//}
|
||||
_DefaultNumColumns = _SectionConfig.Section_ColumnMode.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_ColumnMode), ppLblDefaultNumColumns, ppCmbxNumColumns);
|
||||
|
||||
_DefaultPaginationStyle = _SectionConfig.Section_Pagination.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_Pagination), ppLblDefPaginationStyle, ppCmbxSectPagination);
|
||||
|
||||
//_DefaultPrintSize = _SectionConfig.Section_AttachmentPrintSize.ToString();
|
||||
//SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_AttachmentPrintSize), ppLblDefaultPrintSize, ppCmbxAccPgPrintSize);
|
||||
|
||||
@@ -230,16 +225,21 @@ namespace VEPROMS
|
||||
|
||||
// Get the default values for the property page information
|
||||
FindDefaultValues();
|
||||
|
||||
ppCmbxSectPagination.DataSource = EnumDetail<SectionConfig.SectionPagination>.Details();
|
||||
ppCmbxSectPagination.DisplayMember = "Description";
|
||||
ppCmbxSectPagination.SelectedValueChanged -= new EventHandler(ppCmbxSectPagination_SelectedValueChanged);
|
||||
ppCmbxSectPagination.ValueMember = "EValue";
|
||||
ppCmbxSectPagination.SelectedValueChanged +=new EventHandler(ppCmbxSectPagination_SelectedValueChanged);
|
||||
ppCmbxSectPagination.SelectedIndex = -1;
|
||||
ppCmbxSectPagination.SelectedValue = _SectionConfig.Section_Pagination;
|
||||
|
||||
ppCmbxNumColumns.DataSource = EnumDetail<SectionConfig.SectionColumnMode>.Details();
|
||||
ppCmbxNumColumns.DisplayMember = "Description";
|
||||
ppCmbxNumColumns.SelectedValueChanged -= new EventHandler(ppCmbxNumColumns_SelectedValueChanged);
|
||||
ppCmbxNumColumns.ValueMember = "EValue";
|
||||
ppCmbxNumColumns.SelectedValueChanged += new EventHandler(ppCmbxNumColumns_SelectedValueChanged);
|
||||
ppCmbxNumColumns.SelectedIndex = -1;
|
||||
ppCmbxNumColumns.SelectedValue = _SectionConfig.Section_ColumnMode;
|
||||
|
||||
//ppCmbxAccPgPrintSize.DataSource = EnumDetail<SectionConfig.AttPrintSize>.Details();
|
||||
//ppCmbxAccPgPrintSize.DisplayMember = "Description";
|
||||
@@ -266,11 +266,34 @@ namespace VEPROMS
|
||||
// set the section level configs:
|
||||
ppCbEditableData.Checked = (_SectionConfig.SubSection_Edit == "Y");
|
||||
ppCbAutoIndent.Checked = (_SectionConfig.SubSection_AutoIndent == "Y");
|
||||
|
||||
// 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.
|
||||
//if (
|
||||
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.
|
||||
ppCbIncTOC.Enabled = false;
|
||||
if ((pf.FormatData.PurchaseOptions & E_PurchaseOptions.AutoTableOfContents) == E_PurchaseOptions.AutoTableOfContents && _SectionConfig.MySection.MyContent.Text.ToUpper() != "TABLE OF CONTENTS")
|
||||
{
|
||||
ppCbIncTOC.Enabled = true;
|
||||
ppCbIncTOC.Checked = _SectionConfig.Section_TOC == "Y";
|
||||
}
|
||||
_Initializing = false;
|
||||
}
|
||||
|
||||
private void ppCmbxLibDocFill()
|
||||
{
|
||||
bool sav_Initializing = _Initializing;
|
||||
_Initializing = true;
|
||||
bool isLib = false;
|
||||
if (_SectionConfig.MySection.MyContent.MyEntry!=null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument!=null && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != null) && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) isLib = true;
|
||||
@@ -304,7 +327,7 @@ namespace VEPROMS
|
||||
if (isLib && (LibDocList[i].DocID == _SectionConfig.MySection.MyContent.MyEntry.MyDocument.DocID)) selindx = i;
|
||||
}
|
||||
if (selindx > -1) ppCmbxLibDoc.SelectedIndex = selindx;
|
||||
_Initializing = false;
|
||||
_Initializing = sav_Initializing;
|
||||
}
|
||||
|
||||
#region General tab
|
||||
@@ -708,12 +731,13 @@ namespace VEPROMS
|
||||
if ((cmbx.SelectedIndex != -1) &&
|
||||
cmbx.SelectedValue.Equals(enumval))
|
||||
{
|
||||
bool sav_Initializing = _Initializing;
|
||||
_Initializing = true;
|
||||
button.Visible = true;
|
||||
button.Focus();
|
||||
button.PerformClick();
|
||||
cmbx.SelectedIndex = -1; // This will hide the Default button
|
||||
_Initializing = false;
|
||||
_Initializing = sav_Initializing;
|
||||
}
|
||||
//button.Visible = ((!_FolderConfig.Name.Equals("VEPROMS")) && (cmbx.SelectedValue != null));
|
||||
button.Visible = ((cmbx.SelectedValue != null) && (cmbx.SelectedIndex >= 0));
|
||||
@@ -822,6 +846,13 @@ namespace VEPROMS
|
||||
_SectionConfig.Section_TOC = isInToc ? "Y" : "N";
|
||||
}
|
||||
|
||||
private void ppCmbxCheckoffHeading_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int selindx = ppCmbxCheckoffHeading.SelectedIndex;
|
||||
if (!_Initializing)
|
||||
_SectionConfig.Section_CheckoffHeaderSelection = selindx;
|
||||
}
|
||||
|
||||
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// // Get the parent setting
|
||||
|
Reference in New Issue
Block a user