diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index e838dc3a..e26dd454 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -63,7 +63,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 (ii.HasWordContent) _isStepSection = false; } private void btnSectPropOK_Click(object sender, EventArgs e) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 39cf9a72..0994d7e8 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -87,6 +87,9 @@ namespace VEPROMS this.tcpApplicability = new DevComponents.DotNetBar.TabControlPanel(); this.displayApplicability = new Volian.Controls.Library.DisplayApplicability(); this.infotabApplicability = new DevComponents.DotNetBar.TabItem(this.components); + this.tcpFoldoutMaint = new DevComponents.DotNetBar.TabControlPanel(); + this.displayFoldoutMaint = new Volian.Controls.Library.DisplayFoldoutMaint(); + this.infotabFoldoutMaint = new DevComponents.DotNetBar.TabItem(this.components); this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel(); this.displayHistory = new Volian.Controls.Library.DisplayHistory(); this.infotabHistory = new DevComponents.DotNetBar.TabItem(this.components); @@ -134,6 +137,7 @@ namespace VEPROMS this.infotabControlPanelTags.SuspendLayout(); this.panelEx1.SuspendLayout(); this.tcpApplicability.SuspendLayout(); + this.tcpFoldoutMaint.SuspendLayout(); this.tabControlPanel1.SuspendLayout(); this.infotabControlPanelTransitions.SuspendLayout(); this.infotabControlPanelRO.SuspendLayout(); @@ -751,6 +755,7 @@ namespace VEPROMS this.infoTabs.CanReorderTabs = true; this.infoTabs.Controls.Add(this.infotabControlPanelTags); this.infoTabs.Controls.Add(this.tcpApplicability); + this.infoTabs.Controls.Add(this.tcpFoldoutMaint); this.infoTabs.Controls.Add(this.tabControlPanel1); this.infoTabs.Controls.Add(this.infotabControlPanelTransitions); this.infoTabs.Controls.Add(this.infotabControlPanelRO); @@ -768,6 +773,7 @@ namespace VEPROMS this.infoTabs.Tabs.Add(this.infotabTransition); this.infoTabs.Tabs.Add(this.infotabHistory); this.infoTabs.Tabs.Add(this.infotabApplicability); + this.infoTabs.Tabs.Add(this.infotabFoldoutMaint); this.infoTabs.Text = "tabControl1"; this.infoTabs.ThemeAware = true; // @@ -864,6 +870,39 @@ namespace VEPROMS this.infotabApplicability.Text = "Applicability"; this.infotabApplicability.Visible = false; // + // tcpFoldoutMaint + // + this.tcpFoldoutMaint.Controls.Add(this.displayFoldoutMaint); + this.tcpFoldoutMaint.Dock = System.Windows.Forms.DockStyle.Fill; + this.tcpFoldoutMaint.Location = new System.Drawing.Point(0, 0); + this.tcpFoldoutMaint.Name = "tcpFoldoutMaint"; + this.tcpFoldoutMaint.Padding = new System.Windows.Forms.Padding(1); + this.tcpFoldoutMaint.Size = new System.Drawing.Size(203, 476); + this.tcpFoldoutMaint.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tcpFoldoutMaint.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tcpFoldoutMaint.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Top) + | DevComponents.DotNetBar.eBorderSide.Bottom))); + this.tcpFoldoutMaint.Style.GradientAngle = 180; + this.tcpFoldoutMaint.TabIndex = 7; + this.tcpFoldoutMaint.TabItem = this.infotabApplicability; + this.tcpFoldoutMaint.ThemeAware = true; + // + // displayFoldoutMaint + // + this.displayFoldoutMaint.Dock = System.Windows.Forms.DockStyle.Fill; + this.displayFoldoutMaint.Location = new System.Drawing.Point(1, 1); + this.displayFoldoutMaint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.displayFoldoutMaint.Name = "displayFoldoutMaint"; + this.displayFoldoutMaint.Size = new System.Drawing.Size(201, 474); + this.displayFoldoutMaint.TabIndex = 2; + // + // infotabFoldoutMaint + // + this.infotabFoldoutMaint.AttachedControl = this.tcpFoldoutMaint ; + this.infotabFoldoutMaint.Name = "infotabFoldoutMaint"; + this.infotabFoldoutMaint.Text = "Foldout Maintenance"; + this.infotabFoldoutMaint.Visible = false; + // // tabControlPanel1 // this.tabControlPanel1.Controls.Add(this.displayHistory); @@ -1436,6 +1475,7 @@ namespace VEPROMS this.infotabControlPanelTags.ResumeLayout(false); this.panelEx1.ResumeLayout(false); this.tcpApplicability.ResumeLayout(false); + this.tcpFoldoutMaint.ResumeLayout(false); this.tabControlPanel1.ResumeLayout(false); this.infotabControlPanelTransitions.ResumeLayout(false); this.infotabControlPanelTransitions.PerformLayout(); @@ -1569,6 +1609,9 @@ namespace VEPROMS private DevComponents.DotNetBar.TabControlPanel tcpApplicability; private DevComponents.DotNetBar.TabItem infotabApplicability; private Volian.Controls.Library.DisplayApplicability displayApplicability; + private DevComponents.DotNetBar.TabControlPanel tcpFoldoutMaint; + private DevComponents.DotNetBar.TabItem infotabFoldoutMaint; + private Volian.Controls.Library.DisplayFoldoutMaint displayFoldoutMaint; private DevComponents.DotNetBar.ButtonItem btnSendErrorLog; private DevComponents.DotNetBar.TabControlPanel tabControlPanel3; private DevComponents.DotNetBar.TabItem toosTabReports; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index fabd469b..b755369c 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1455,7 +1455,7 @@ namespace VEPROMS _CurrentItem = null; ctrlAnnotationDetails.CurrentAnnotation = null; ctrlAnnotationDetails.Annotations = null; - infotabRO.Visible = infotabTransition.Visible = infotabTags.Visible = infotabHistory.Visible = infotabApplicability.Visible = false; + infotabFoldoutMaint.Visible = infotabRO.Visible = infotabTransition.Visible = infotabTags.Visible = infotabHistory.Visible = infotabApplicability.Visible = false; // When infotabTags is set to InVisible, the matching panel also needs to be set to invisible infotabControlPanelTags.Visible = false; displayTags.Visible = false; @@ -1480,6 +1480,7 @@ namespace VEPROMS displayRO.MyRTB = null; infotabTags.Visible = false; displayBookMarks.MyEditItem = null; + displayFoldoutMaint.Visible = false; //vlnStackTrace.ShowStack("enter tc_ItemSelectedChanged {0}", _CurrentItem); } else @@ -1513,6 +1514,18 @@ namespace VEPROMS infotabApplicability.Visible = true; displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo; } + if (args.MyEditItem.MyItemInfo.ActiveFormat != null) + { + // see if format has floating foldouts, and if so, display the panel. + if (args.MyEditItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout) + { + + displayFoldoutMaint.Visible = true; + infotabFoldoutMaint.Visible = true; + displayFoldoutMaint.Enabled = true; + displayFoldoutMaint.MyItemInfo = args.MyItemInfo; + } + } // When infotabTags is set to Visible, it is given focus. The next line returns focus to the StepRTB args.MyEditItem.SetFocus(); displayTransition.MyRTB = args.MyEditItem.MyStepRTB; diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 1860cd87..e1fc27a3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1122,8 +1122,13 @@ namespace VEPROMS.CSLA.Library StepConfig sc = MyConfig as StepConfig; int iiForFoldout = sc != null ? sc.Step_FloatingFoldout : -1; if (iiForFoldout <= 0) return -1; - // FOR NOW, Just return the first one. Later need to find foldout list & return the one we're pointing - // to. + int fldid = sc.Step_FloatingFoldout; + int indxOfFoldout = 0; + foreach (ItemInfo sect in MyProcedure.Sections) + { + if (sect.ItemID == fldid) return indxOfFoldout; + if (sect.DisplayText.ToUpper().StartsWith("FOLDOUT")) indxOfFoldout++; + } return 0; } return -1; // does not have a foldout @@ -1293,7 +1298,7 @@ namespace VEPROMS.CSLA.Library //string number = cont.Number; string number = DisplayNumber; //if (cont.Type >= 20000) number = Ordinal.ToString() + "."; - if (cont.Type >= 20000) number = MyTab.CleanText; + if (cont.Type >= 20000) number = MyTab==null?"":MyTab.CleanText; return string.Format("{0} {1}", number, DisplayText).Trim(); //return string.Format("{0} {1}", number, cont.Text).Trim(); //return string.Format("{0} {1}", cont.Number, cont.Text); @@ -2250,7 +2255,7 @@ namespace VEPROMS.CSLA.Library if (ActiveFormat.Name.ToUpper() == "WCNCKL" || ActiveFormat.Name.ToUpper() == "WSTCKL") { tbformat = FormatStepData.TabData.IdentEdit; - if (FormatStepData.StepLayoutData.AlignWithParentTab) tbformat = tbformat.TrimStart(" ".ToCharArray()); + if (ActiveFormat.Name.ToUpper() == "WCNCKL" && FormatStepData.StepLayoutData.AlignWithParentTab) tbformat = tbformat.TrimStart(" ".ToCharArray()); } // rno gets parent tab if (IsRNOPart && FormatStepData.NumberSubs) @@ -2683,6 +2688,8 @@ namespace VEPROMS.CSLA.Library // 'bb', 'cc'. The Westinghouse work required this and 16bit was tested and it worked the // same way as the Westinghouse requirement. The original code to do 'aa', 'ab' was left here, // commented out, in case a future plant needs it and then should tie it to a format flag. + // And Westinghouse had so many steps, added in to do 'aaa' + if (number > 52) retval += Letter(1 + ((number - 1) % 52)); if (number > 26) retval += Letter(1 + ((number - 1) % 26)); // Letter((number - 1) / 26); retval += Letter(1 + ((number - 1) % 26)); return retval; diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs index 6153f4e8..03ca6b21 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs @@ -344,6 +344,32 @@ namespace VEPROMS.CSLA.Library } } #endregion + #region MSWordXAdj + private LazyLoad _MSWordXAdj; + [Category("Location")] + [DisplayName("MSWord X Adjustment")] + [Description("X Placement of PDF during Print")] + public float? MSWordXAdj + { + get + { + return LazyLoad(ref _MSWordXAdj, "@MSWordXAdj"); + } + } + #endregion + #region MSWordYAdj + private LazyLoad _MSWordYAdj; + [Category("Location")] + [DisplayName("MSWord Y Adjustment")] + [Description("Y Placement of PDF during Print")] + public float? MSWordYAdj + { + get + { + return LazyLoad(ref _MSWordYAdj, "@MSWordYAdj"); + } + } + #endregion #region SectionMacro private LazyLoad _SectionMacro; [Category("Extras")]