diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 1d859b10..0924e831 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -156,12 +156,12 @@ namespace Volian.Controls.Library cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO. if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER - // if there are no checkoffs OR - // if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we - // may want to allow them to turn off the checkoff - if ((fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) || - fmtdata.ProcData.CheckOffData.Menu=="Signoff") - cmbCheckoff.Enabled = false; + //// if there are no checkoffs OR + //// if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we + //// may want to allow them to turn off the checkoff + //if ((fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) || + // fmtdata.ProcData.CheckOffData.Menu=="Signoff") + // cmbCheckoff.Enabled = false; if (sc == null) // if there is no config data, Page Break and CAS check boxes are false { @@ -173,8 +173,10 @@ namespace Volian.Controls.Library if (CurItemInfo.IsHigh) cbPageBreak.Checked = sc.Step_NewManualPagebreak; cbCAS.Checked = sc.Step_CAS; } - - if (!(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0)) + bool _checkoffsAllowed = true; + if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly) + _checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep"); + if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0)) { cmbCheckoff.Items.Clear(); foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList) @@ -183,6 +185,17 @@ namespace Volian.Controls.Library } if (sc.Step_CheckOffIndex != -1) cmbCheckoff.SelectedIndex = sc.Step_CheckOffIndex; } + // if there are no checkoffs OR + // if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we + // may want to allow them to turn off the checkoff + // Catawba and McGuire formats use this + if (_checkoffsAllowed && (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) || + fmtdata.ProcData.CheckOffData.Menu == "Signoff") + { + SectionConfig secf = CurItemInfo.MyActiveSection.MyConfig as SectionConfig; + if (secf.Section_CheckoffListSelection > 0) cmbCheckoff.SelectedIndex = secf.Section_CheckoffListSelection - ((fmtdata.ProcData.CheckOffData.Menu == "Signoff") ? 0 : 1); + cmbCheckoff.Enabled = false; + } // change bar setting depends on whether step has changed (dts) as compared to date/time off the // procedure that it's in. diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index e516dbc8..5b1675a3 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -187,6 +187,8 @@ namespace Volian.Controls.Library // Deal with change in item data value.Changed += new ItemInfoEvent(value_Changed); value.OrdinalChanged += new ItemInfoEvent(value_OrdinalChanged); + // do something like this to draw circle around step numbers - note got NULL reference error on NSP data + //if (value.FormatStepData != null && value.FormatStepData.TabData.IdentPrint.Contains("C0")) Circle = true; } } void value_Changed(object sender) @@ -1693,6 +1695,15 @@ namespace Volian.Controls.Library if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) if (MyItemInfo.IsCaution || MyItemInfo.IsNote) bottom = Top; + + // SameRowAsParent - Comanche Peak Step Designator + //FormatData fmtdata = MyItemInfo.ActiveFormat.PlantFormat.FormatData; + //int formatSteptype = MyItemInfo.FormatStepType; + //if (fmtdata.StepDataList[formatSteptype].SameRowAsParent) + //if (MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) + // bottom = Top; + + if (nextEditItem.Top != bottom) { MyStepPanel.ItemMoving++; @@ -2072,6 +2083,11 @@ namespace Volian.Controls.Library TopMostEditItem.ItemLocation = new Point(TopMostEditItem.ItemLocation.X, _MyParentEditItem.Bottom); //TextWidth = _WidthAdjust + borderWidth + MyStepPanel.ToDisplay(_MyStepSectionLayoutData.WidSTableEdit, Convert.ToInt32(_MyStepSectionLayoutData.PMode) - 1); ContentWidth = _WidthAdjust + BorderWidth + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, MyItemInfo.ColumnMode); + //ContentWidth = _WidthAdjust + BorderWidth; + //if (MyItemInfo.FormatStepData.WidthOverrideEdit != null && MyItemInfo.FormatStepData.WidthOverrideEdit > 0) + // ContentWidth += MyStepPanel.ToDisplay(MyItemInfo.FormatStepData.WidthOverrideEdit); + //else + // ContentWidth += MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, MyItemInfo.ColumnMode); break; case 2: // Step // if Table then determine width and location based upon it's parent's location @@ -2177,7 +2193,12 @@ namespace Volian.Controls.Library MyStepPanel.ItemMoving++; //Location = new Point(_MyParentRTBItem.Left + 20, FindTop(_MyParentRTBItem.Top)); int myTop = MyNextEditItem == null ? _MyParentEditItem.Top : MyNextEditItem.Top; - if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsCaution || MyItemInfo.IsNote )) + //if (MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) + //{ + // if (MyItemInfo.WidthOverride > 0) + // Width = MyStepPanel.ToDisplay(MyItemInfo.WidthOverride) + spaceToRTB; + //} + if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) { int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT); //if (MyItemInfo.ItemID == 1 || MyItemInfo.ItemID == 52) @@ -2238,6 +2259,7 @@ namespace Volian.Controls.Library if (TopMostEditItem == this) { if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsNote || MyItemInfo.IsCaution)) + //if ((MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) || (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsNote || MyItemInfo.IsCaution))) { int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT); if (MyItemInfo.IsNote) @@ -2248,6 +2270,7 @@ namespace Volian.Controls.Library { int top = FindTop(_MyPreviousEditItem.BottomMostEditItem.Bottom); if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && _MyPreviousEditItem.MyItemInfo.IsHigh) + //if (MyItemInfo.SameRowAsParent || (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && _MyPreviousEditItem.MyItemInfo.IsHigh)) { if (_MyPreviousEditItem.MyBeforeEditItems != null) foreach(EditItem ei in _MyPreviousEditItem.MyBeforeEditItems) @@ -2399,6 +2422,8 @@ namespace Volian.Controls.Library if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) if (MyItemInfo.IsCaution || MyItemInfo.IsNote) top = myParentEditItem.TopMostEditItem.Top; + //if ((MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) || (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsCaution || MyItemInfo.IsNote))) + // top = myParentEditItem.TopMostEditItem.Top; if (Top < top) { LastMethodsPush("SetupRTBItem"); @@ -2505,7 +2530,12 @@ namespace Volian.Controls.Library else { RTBItem ri = this as RTBItem; - location = new PointF(ri.MyStepRTB.Left + ri.MyStepRTB.Width + 2, ri.MyStepRTB.Top); + // SkipSpaces puts the checkoff macro (if specified in the format) next to the step tab + // this is used for Bryon and Braidwood + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces) + location = new PointF(ri.MyStepRTB.Left - 50, ri.MyStepRTB.Top); + else + location = new PointF(ri.MyStepRTB.Left + ri.MyStepRTB.Width + 2, ri.MyStepRTB.Top); } CheckOff co = MyItemInfo.GetCheckOffStep(); // There may have been a data change in the setting of which checkoff to use (property