From 00dc6448c209a0e8e1271bb6ca0ce6058a7cea00 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 12 Apr 2012 16:33:18 +0000 Subject: [PATCH] --- .../frmSectionProperties.Designer.cs | 110 +++++++++++------- .../frmSectionProperties.cs | 11 ++ .../frmSectionProperties.resx | 6 +- .../Config/SectionConfig.cs | 17 +++ 4 files changed, 96 insertions(+), 48 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs index adbc501b..f5cb0b53 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.Designer.cs @@ -36,11 +36,11 @@ namespace VEPROMS this.lblLastModDate = new System.Windows.Forms.Label(); this.lblSectTitle = new System.Windows.Forms.Label(); this.lblSectNumber = new System.Windows.Forms.Label(); - this.sectionConfigBindingSource = new System.Windows.Forms.BindingSource(this.components); this.ppCmbxSectPagination = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.ppCmbxStyleSectionType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.ppBtnDefaultFmt = new DevComponents.DotNetBar.ButtonX(); this.ppCmbxFormat = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.sectionConfigBindingSource = new System.Windows.Forms.BindingSource(this.components); this.ppLblFormatDefault = new System.Windows.Forms.Label(); this.ppCmbxCheckoffHeading = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.ppCmbxCheckoffType = new DevComponents.DotNetBar.Controls.ComboBoxEx(); @@ -95,13 +95,14 @@ namespace VEPROMS this.ppCbPlaceKeeper = new System.Windows.Forms.CheckBox(); this.ppCbIncTOC = new System.Windows.Forms.CheckBox(); this.tiAutomation = new DevComponents.DotNetBar.TabItem(this.components); - this.tcpLibDoc = new DevComponents.DotNetBar.TabControlPanel(); - this.tiLibDoc = new DevComponents.DotNetBar.TabItem(this.components); this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel(); + this.cbKeepWordDocMargins = new System.Windows.Forms.CheckBox(); this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel(); this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components); + this.tcpLibDoc = new DevComponents.DotNetBar.TabControlPanel(); + this.tiLibDoc = new DevComponents.DotNetBar.TabItem(this.components); this.tabControlPanel4 = new DevComponents.DotNetBar.TabControlPanel(); this.tiViewStnns = new DevComponents.DotNetBar.TabItem(this.components); ((System.ComponentModel.ISupportInitialize)(this.sectionConfigBindingSource)).BeginInit(); @@ -110,9 +111,9 @@ namespace VEPROMS this.tcSectionProp.SuspendLayout(); this.tcpGeneral.SuspendLayout(); this.tcpAutomation.SuspendLayout(); - this.tcpLibDoc.SuspendLayout(); this.tcpFormat.SuspendLayout(); this.ppGpbxSignoffCheckoff.SuspendLayout(); + this.tcpLibDoc.SuspendLayout(); this.tabControlPanel4.SuspendLayout(); this.SuspendLayout(); // @@ -183,11 +184,6 @@ namespace VEPROMS this.lblSectNumber.TabIndex = 0; this.lblSectNumber.Text = "Number"; // - // sectionConfigBindingSource - // - this.sectionConfigBindingSource.AllowNew = false; - this.sectionConfigBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.SectionConfig); - // // ppCmbxSectPagination // this.ppCmbxSectPagination.DisplayMember = "Text"; @@ -224,6 +220,7 @@ namespace VEPROMS // ppBtnDefaultFmt // this.ppBtnDefaultFmt.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.ppBtnDefaultFmt.FocusOnLeftMouseButtonDown = true; this.ppBtnDefaultFmt.Location = new System.Drawing.Point(587, 22); this.ppBtnDefaultFmt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultFmt.Name = "ppBtnDefaultFmt"; @@ -252,6 +249,11 @@ namespace VEPROMS this.ppCmbxFormat.WatermarkText = "select a format"; this.ppCmbxFormat.SelectedIndexChanged += new System.EventHandler(this.ppCmbxFormat_SelectedIndexChanged); // + // sectionConfigBindingSource + // + this.sectionConfigBindingSource.AllowNew = false; + this.sectionConfigBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.SectionConfig); + // // ppLblFormatDefault // this.ppLblFormatDefault.AutoSize = true; @@ -362,6 +364,7 @@ namespace VEPROMS // ppBtnCvrtToLibDoc // this.ppBtnCvrtToLibDoc.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.ppBtnCvrtToLibDoc.FocusOnLeftMouseButtonDown = true; this.ppBtnCvrtToLibDoc.Location = new System.Drawing.Point(21, 237); this.ppBtnCvrtToLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnCvrtToLibDoc.Name = "ppBtnCvrtToLibDoc"; @@ -503,7 +506,6 @@ namespace VEPROMS // // // - this.ppCbShwDefSettings.BackgroundStyle.Class = ""; this.ppCbShwDefSettings.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ppCbShwDefSettings.Location = new System.Drawing.Point(11, 494); this.ppCbShwDefSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); @@ -622,6 +624,7 @@ namespace VEPROMS // ppBtnDefaultPaginationStyle // this.ppBtnDefaultPaginationStyle.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.ppBtnDefaultPaginationStyle.FocusOnLeftMouseButtonDown = true; this.ppBtnDefaultPaginationStyle.Location = new System.Drawing.Point(281, 166); this.ppBtnDefaultPaginationStyle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultPaginationStyle.Name = "ppBtnDefaultPaginationStyle"; @@ -637,6 +640,7 @@ namespace VEPROMS // ppBtnDefaultNumColumns // this.ppBtnDefaultNumColumns.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.ppBtnDefaultNumColumns.FocusOnLeftMouseButtonDown = true; this.ppBtnDefaultNumColumns.Location = new System.Drawing.Point(230, 227); this.ppBtnDefaultNumColumns.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultNumColumns.Name = "ppBtnDefaultNumColumns"; @@ -695,6 +699,7 @@ namespace VEPROMS this.btnAutomation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnAutomation.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnAutomation.Dock = System.Windows.Forms.DockStyle.Top; + this.btnAutomation.FocusOnLeftMouseButtonDown = true; this.btnAutomation.Location = new System.Drawing.Point(0, 69); this.btnAutomation.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnAutomation.Name = "btnAutomation"; @@ -708,6 +713,7 @@ namespace VEPROMS this.btnLibDocs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnLibDocs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnLibDocs.Dock = System.Windows.Forms.DockStyle.Top; + this.btnLibDocs.FocusOnLeftMouseButtonDown = true; this.btnLibDocs.Location = new System.Drawing.Point(0, 46); this.btnLibDocs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnLibDocs.Name = "btnLibDocs"; @@ -721,6 +727,7 @@ namespace VEPROMS this.btnFormat.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnFormat.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnFormat.Dock = System.Windows.Forms.DockStyle.Top; + this.btnFormat.FocusOnLeftMouseButtonDown = true; this.btnFormat.Location = new System.Drawing.Point(0, 23); this.btnFormat.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnFormat.Name = "btnFormat"; @@ -734,6 +741,7 @@ namespace VEPROMS this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; + this.btnGeneral.FocusOnLeftMouseButtonDown = true; this.btnGeneral.Location = new System.Drawing.Point(0, 0); this.btnGeneral.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnGeneral.Name = "btnGeneral"; @@ -974,35 +982,9 @@ namespace VEPROMS this.tiAutomation.Name = "tiAutomation"; this.tiAutomation.Text = "Automation"; // - // tcpLibDoc - // - this.tcpLibDoc.Controls.Add(this.ppBtnCvrtToLibDoc); - this.tcpLibDoc.Controls.Add(this.lblLibraryDocument); - this.tcpLibDoc.Controls.Add(this.ppCmbxLibDoc); - this.tcpLibDoc.Dock = System.Windows.Forms.DockStyle.Fill; - this.tcpLibDoc.Location = new System.Drawing.Point(0, 24); - 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(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; - this.tcpLibDoc.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199))))); - this.tcpLibDoc.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) - | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tcpLibDoc.Style.GradientAngle = 90; - this.tcpLibDoc.TabIndex = 3; - this.tcpLibDoc.TabItem = this.tiLibDoc; - // - // tiLibDoc - // - this.tiLibDoc.AttachedControl = this.tcpLibDoc; - this.tiLibDoc.Name = "tiLibDoc"; - this.tiLibDoc.Text = "Library Document"; - // // tcpFormat // + this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins); this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns); this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle); this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns); @@ -1037,13 +1019,26 @@ namespace VEPROMS this.tcpFormat.TabItem = this.tiFormat; this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter); // + // cbKeepWordDocMargins + // + this.cbKeepWordDocMargins.AutoSize = true; + this.cbKeepWordDocMargins.BackColor = System.Drawing.Color.Transparent; + this.cbKeepWordDocMargins.Location = new System.Drawing.Point(24, 351); + this.cbKeepWordDocMargins.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbKeepWordDocMargins.Name = "cbKeepWordDocMargins"; + this.cbKeepWordDocMargins.Size = new System.Drawing.Size(223, 21); + this.cbKeepWordDocMargins.TabIndex = 59; + this.cbKeepWordDocMargins.Text = "Keep Word Document Margins"; + this.cbKeepWordDocMargins.UseVisualStyleBackColor = false; + this.cbKeepWordDocMargins.Visible = false; + this.cbKeepWordDocMargins.CheckedChanged += new System.EventHandler(this.cbKeepWordDocMargins_CheckedChanged); + // // rbWordSect // this.rbWordSect.BackColor = System.Drawing.Color.Transparent; // // // - this.rbWordSect.BackgroundStyle.Class = ""; this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -1061,7 +1056,6 @@ namespace VEPROMS // // // - this.rbStepSect.BackgroundStyle.Class = ""; this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; this.rbStepSect.Checked = true; @@ -1106,7 +1100,6 @@ namespace VEPROMS this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1; this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1; - this.ppGpbxSignoffCheckoff.Style.Class = ""; this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4; this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; @@ -1115,12 +1108,10 @@ namespace VEPROMS // // // - this.ppGpbxSignoffCheckoff.StyleMouseDown.Class = ""; this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; // // // - this.ppGpbxSignoffCheckoff.StyleMouseOver.Class = ""; this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ppGpbxSignoffCheckoff.TabIndex = 51; this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs"; @@ -1131,6 +1122,33 @@ namespace VEPROMS this.tiFormat.Name = "tiFormat"; this.tiFormat.Text = "Format"; // + // tcpLibDoc + // + this.tcpLibDoc.Controls.Add(this.ppBtnCvrtToLibDoc); + this.tcpLibDoc.Controls.Add(this.lblLibraryDocument); + this.tcpLibDoc.Controls.Add(this.ppCmbxLibDoc); + this.tcpLibDoc.Dock = System.Windows.Forms.DockStyle.Fill; + this.tcpLibDoc.Location = new System.Drawing.Point(0, 24); + 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(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; + this.tcpLibDoc.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199))))); + this.tcpLibDoc.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + | DevComponents.DotNetBar.eBorderSide.Bottom))); + this.tcpLibDoc.Style.GradientAngle = 90; + this.tcpLibDoc.TabIndex = 3; + this.tcpLibDoc.TabItem = this.tiLibDoc; + // + // tiLibDoc + // + this.tiLibDoc.AttachedControl = this.tcpLibDoc; + this.tiLibDoc.Name = "tiLibDoc"; + this.tiLibDoc.Text = "Library Document"; + // // tabControlPanel4 // this.tabControlPanel4.Controls.Add(this.ppCkLstApplicabilityDesinations); @@ -1165,7 +1183,7 @@ namespace VEPROMS this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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(954, 467); + this.ClientSize = new System.Drawing.Size(946, 459); this.ControlBox = false; this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.panSectBtns); @@ -1173,6 +1191,7 @@ 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; @@ -1192,12 +1211,12 @@ namespace VEPROMS this.tcpGeneral.PerformLayout(); this.tcpAutomation.ResumeLayout(false); this.tcpAutomation.PerformLayout(); - this.tcpLibDoc.ResumeLayout(false); - this.tcpLibDoc.PerformLayout(); this.tcpFormat.ResumeLayout(false); this.tcpFormat.PerformLayout(); this.ppGpbxSignoffCheckoff.ResumeLayout(false); this.ppGpbxSignoffCheckoff.PerformLayout(); + this.tcpLibDoc.ResumeLayout(false); + this.tcpLibDoc.PerformLayout(); this.tabControlPanel4.ResumeLayout(false); this.tabControlPanel4.PerformLayout(); this.ResumeLayout(false); @@ -1281,5 +1300,6 @@ namespace VEPROMS private System.Windows.Forms.CheckBox ppCbEditableData; private System.Windows.Forms.CheckBox ppCbPrnSecNumTitle; private System.Windows.Forms.CheckBox ppCbAutoIndent; + private System.Windows.Forms.CheckBox cbKeepWordDocMargins; } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index cd86e3c7..9e80bec1 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -290,6 +290,9 @@ namespace VEPROMS ppCbIncTOC.Enabled = true; ppCbIncTOC.Checked = _SectionConfig.Section_TOC == "Y"; } + if (!_SectionConfig.MySection.MySectionInfo.IsStepSection) + cbKeepWordDocMargins.Checked = _SectionConfig.Section_WordMargin == "Y"; + _Initializing = false; } @@ -772,6 +775,7 @@ namespace VEPROMS //lblPrintSize.Visible = !_isStepSection; //ppCmbxAccPgPrintSize.Visible = !_isStepSection; ppGpbxSignoffCheckoff.Visible = _isStepSection; + cbKeepWordDocMargins.Visible = !_isStepSection; } private void rbStepSect_CheckedChanged(object sender, EventArgs e) @@ -861,6 +865,13 @@ namespace VEPROMS _SectionConfig.Section_CheckoffHeaderSelection = selindx; } + private void cbKeepWordDocMargins_CheckedChanged(object sender, EventArgs e) + { + bool doWordMargin = cbKeepWordDocMargins.Checked; + if (!_Initializing) + _SectionConfig.Section_WordMargin = doWordMargin ? "Y" : "N"; + } + //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //{ // // Get the parent setting diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.resx b/PROMS/VEPROMS User Interface/frmSectionProperties.resx index f31cce76..1240a52a 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.resx +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 128, 18 - 571, 19 @@ -132,6 +129,9 @@ Separate - this section will always begin on a new page. Continous - this section will not begin on a new page if there is room on the current page. + + 128, 18 + Allows you to specify the format to use for this section. diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs index 7252d588..9d02d5d9 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs @@ -255,6 +255,23 @@ namespace VEPROMS.CSLA.Library } public Section MySection { get { return _Section; } } + [Category("Format")] + [DisplayName("Keep Word Document Margins")] + [RefreshProperties(RefreshProperties.All)] + [Description("Section WordMargin")] + public string Section_WordMargin + { + get + { + string tmp = _Xp["Section", "WordMargin"]; + return tmp == null || tmp == "" ? "N" : tmp; + } + set + { + _Xp["Section", "WordMargin"] = value; + OnPropertyChanged("Section_WordMargin"); + } + } #endregion #region ToString public override string ToString()