diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs index b77c85af..adbc501b 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs @@ -190,7 +190,6 @@ namespace VEPROMS // // ppCmbxSectPagination // - this.ppCmbxSectPagination.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.sectionConfigBindingSource, "Section_Pagination", true)); this.ppCmbxSectPagination.DisplayMember = "Text"; this.ppCmbxSectPagination.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.ppCmbxSectPagination.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -281,6 +280,7 @@ namespace VEPROMS this.ppCmbxCheckoffHeading.TabIndex = 30; this.ppCmbxCheckoffHeading.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ppCmbxCheckoffHeading.WatermarkText = "select checkoff / signoff heading"; + this.ppCmbxCheckoffHeading.SelectedIndexChanged += new System.EventHandler(this.ppCmbxCheckoffHeading_SelectedIndexChanged); // // ppCmbxCheckoffType // @@ -465,7 +465,7 @@ namespace VEPROMS // this.ppBtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ppBtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.ppBtnCancel.Location = new System.Drawing.Point(861, 415); + this.ppBtnCancel.Location = new System.Drawing.Point(846, 433); this.ppBtnCancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnCancel.Name = "ppBtnCancel"; this.ppBtnCancel.Size = new System.Drawing.Size(75, 26); @@ -476,7 +476,8 @@ namespace VEPROMS // // ppBtnOK // - this.ppBtnOK.Location = new System.Drawing.Point(780, 415); + this.ppBtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ppBtnOK.Location = new System.Drawing.Point(765, 434); this.ppBtnOK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnOK.Name = "ppBtnOK"; this.ppBtnOK.Size = new System.Drawing.Size(75, 26); @@ -490,7 +491,7 @@ namespace VEPROMS this.ppLblDefSettingsInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.ppLblDefSettingsInfo.AutoSize = true; this.ppLblDefSettingsInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ppLblDefSettingsInfo.Location = new System.Drawing.Point(10, 420); + this.ppLblDefSettingsInfo.Location = new System.Drawing.Point(10, 450); this.ppLblDefSettingsInfo.Name = "ppLblDefSettingsInfo"; this.ppLblDefSettingsInfo.Size = new System.Drawing.Size(205, 17); this.ppLblDefSettingsInfo.TabIndex = 25; @@ -504,7 +505,7 @@ namespace VEPROMS // this.ppCbShwDefSettings.BackgroundStyle.Class = ""; this.ppCbShwDefSettings.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ppCbShwDefSettings.Location = new System.Drawing.Point(11, 453); + this.ppCbShwDefSettings.Location = new System.Drawing.Point(11, 494); this.ppCbShwDefSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppCbShwDefSettings.Name = "ppCbShwDefSettings"; this.ppCbShwDefSettings.Size = new System.Drawing.Size(193, 23); @@ -743,19 +744,21 @@ namespace VEPROMS // // tcSectionProp // + this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); this.tcSectionProp.BackColor = System.Drawing.Color.Transparent; this.tcSectionProp.CanReorderTabs = true; + this.tcSectionProp.Controls.Add(this.tcpFormat); this.tcSectionProp.Controls.Add(this.tcpGeneral); this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpLibDoc); - this.tcSectionProp.Controls.Add(this.tcpFormat); this.tcSectionProp.Controls.Add(this.tabControlPanel4); - this.tcSectionProp.Location = new System.Drawing.Point(274, 10); + this.tcSectionProp.Location = new System.Drawing.Point(214, 10); this.tcSectionProp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tcSectionProp.Name = "tcSectionProp"; this.tcSectionProp.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold); this.tcSectionProp.SelectedTabIndex = 0; - this.tcSectionProp.Size = new System.Drawing.Size(648, 385); + this.tcSectionProp.Size = new System.Drawing.Size(709, 412); this.tcSectionProp.Style = DevComponents.DotNetBar.eTabStripStyle.Office2007Dock; this.tcSectionProp.TabIndex = 29; this.tcSectionProp.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox; @@ -784,7 +787,7 @@ namespace VEPROMS this.tcpGeneral.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tcpGeneral.Name = "tcpGeneral"; this.tcpGeneral.Padding = new System.Windows.Forms.Padding(1); - this.tcpGeneral.Size = new System.Drawing.Size(648, 361); + this.tcpGeneral.Size = new System.Drawing.Size(709, 388); this.tcpGeneral.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254))))); this.tcpGeneral.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227))))); this.tcpGeneral.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; @@ -845,6 +848,7 @@ namespace VEPROMS this.ppSectNumberStpRTB.EditMode = true; this.ppSectNumberStpRTB.FieldToEdit = Volian.Controls.Library.E_FieldToEdit.StepText; this.ppSectNumberStpRTB.FormatFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F); + this.ppSectNumberStpRTB.LastRtf = ""; this.ppSectNumberStpRTB.Location = new System.Drawing.Point(85, 12); this.ppSectNumberStpRTB.MinimumSize = new System.Drawing.Size(159, 18); this.ppSectNumberStpRTB.MyClassName = "RichEdit20W"; @@ -878,6 +882,7 @@ namespace VEPROMS this.ppSectTitleStpRTB.EditMode = true; this.ppSectTitleStpRTB.FieldToEdit = Volian.Controls.Library.E_FieldToEdit.StepText; this.ppSectTitleStpRTB.FormatFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F); + this.ppSectTitleStpRTB.LastRtf = ""; this.ppSectTitleStpRTB.Location = new System.Drawing.Point(85, 60); this.ppSectTitleStpRTB.MinimumSize = new System.Drawing.Size(541, 61); this.ppSectTitleStpRTB.MyClassName = "RichEdit20W"; @@ -912,7 +917,7 @@ namespace VEPROMS this.tcpAutomation.Location = new System.Drawing.Point(0, 24); this.tcpAutomation.Name = "tcpAutomation"; this.tcpAutomation.Padding = new System.Windows.Forms.Padding(1); - this.tcpAutomation.Size = new System.Drawing.Size(648, 361); + this.tcpAutomation.Size = new System.Drawing.Size(709, 388); this.tcpAutomation.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254))))); this.tcpAutomation.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227))))); this.tcpAutomation.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; @@ -979,7 +984,7 @@ namespace VEPROMS this.tcpLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tcpLibDoc.Name = "tcpLibDoc"; this.tcpLibDoc.Padding = new System.Windows.Forms.Padding(1); - this.tcpLibDoc.Size = new System.Drawing.Size(648, 361); + this.tcpLibDoc.Size = new System.Drawing.Size(709, 388); this.tcpLibDoc.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254))))); this.tcpLibDoc.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227))))); this.tcpLibDoc.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; @@ -1020,7 +1025,7 @@ namespace VEPROMS this.tcpFormat.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tcpFormat.Name = "tcpFormat"; this.tcpFormat.Padding = new System.Windows.Forms.Padding(1); - this.tcpFormat.Size = new System.Drawing.Size(648, 361); + this.tcpFormat.Size = new System.Drawing.Size(709, 388); this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254))))); this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227))))); this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; @@ -1138,7 +1143,7 @@ namespace VEPROMS this.tabControlPanel4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tabControlPanel4.Name = "tabControlPanel4"; this.tabControlPanel4.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel4.Size = new System.Drawing.Size(648, 361); + this.tabControlPanel4.Size = new System.Drawing.Size(709, 388); this.tabControlPanel4.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254))))); this.tabControlPanel4.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227))))); this.tabControlPanel4.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; @@ -1159,9 +1164,8 @@ namespace VEPROMS // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 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(936, 442); + this.ClientSize = new System.Drawing.Size(954, 467); this.ControlBox = false; this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.panSectBtns); @@ -1169,7 +1173,6 @@ namespace VEPROMS this.Controls.Add(this.ppLblDefSettingsInfo); this.Controls.Add(this.ppBtnCancel); this.Controls.Add(this.ppBtnOK); - this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.MaximizeBox = false; diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index 22e50c9c..7875c56f 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -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.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.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.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 diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 092d710b..4eba716a 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -72,6 +72,7 @@ namespace VEPROMS Settings.Default.ShowDefaultVersionProp = ppCbShwDefSettings.Checked; Settings.Default.Save(); DialogResult = DialogResult.OK; + _DocVersionConfig.MyDocVersion.Config = _DocVersionConfig.ToString(); _DocVersionConfig.MyDocVersion.Save().Dispose(); this.Close(); }