From e1d596e85f4d15b715e019a2a057a2b1d00aa2d3 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 2 Nov 2015 21:31:47 +0000 Subject: [PATCH] Added a default column mode for the procedure Logic to use the default column mode set in the format Created a default column mode for the procedure --- PROMS/Formats/fmtall/GinnaFSGbckall.xml | Bin 40246 -> 40276 bytes PROMS/Formats/fmtall/RGEBCKall.xml | Bin 40188 -> 40218 bytes .../VEPROMS.CSLA.Library/Config/ProcConfig.cs | 15 ++++++++++++++- .../Format/PlantFormat.cs | 8 ++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/PROMS/Formats/fmtall/GinnaFSGbckall.xml b/PROMS/Formats/fmtall/GinnaFSGbckall.xml index 31cf9dfa85aa0d567e02d9a2f8fca4a56ae4a666..a23e40fbd85c283905f088ccdb3c8fe7a1eb419f 100644 GIT binary patch delta 20 ccmdnCi|NWPrVSe0tfdUO40)URxz#5D08zaL!2kdN delta 14 Wcmcbzi)q^~rVSe0o87qiCIJ92m<5Ue diff --git a/PROMS/Formats/fmtall/RGEBCKall.xml b/PROMS/Formats/fmtall/RGEBCKall.xml index b40727b80f5dea8c1f97522ca375698cd8f590ec..519d4f66bf03560df8537d595639417d862dbdb0 100644 GIT binary patch delta 20 ccmeyflWEp2rVR?*tfdUO40)T`xxY>X090ECi2wiq delta 14 WcmbQWi|Nl!rVR?*o9(#oOauTirv_30 diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs index 73801305..816de0d8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs @@ -222,6 +222,15 @@ namespace VEPROMS.CSLA.Library return null; } } + public FormatInfo DefaultFormat + { + get + { + if (_Procedure != null && _Procedure.MyProcedureInfo.ActiveParent != null && _Procedure.MyProcedureInfo.ActiveParent.ActiveFormat != null) return FormatInfo.Get(_Procedure.MyProcedureInfo.ActiveParent.ActiveFormat.FormatID); + if (_ProcedureInfo != null && _ProcedureInfo.MyParent != null && _ProcedureInfo.MyParent.ActiveFormat != null) return _ProcedureInfo.MyParent.ActiveFormat; + return null; + } + } public Procedure MyProcedure { get { return _Procedure; } } #endregion @@ -262,7 +271,11 @@ namespace VEPROMS.CSLA.Library s = _Xp.ParentValue("Format", "Columns"); // get the parent value // If there is no parent value, then use the volian default if (s == string.Empty || s == "t") // fnp aop1 had this (not sure about other fnp data) - return FormatColumns.TwoColumn;// At the procedure level, default to Two column + { + if (DefaultFormat != null) + return (FormatColumns) (DefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode?? + (int)FormatColumns.TwoColumn);// At the procedure level, default to Two column + } return (FormatColumns)int.Parse(s); } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index ea7a9f67..614ae29c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -2935,6 +2935,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _PMode, "@PMode"); } } + private LazyLoad _ColumnMode; + public int? ColumnMode + { + get + { + return LazyLoad(ref _ColumnMode, "@ColumnMode"); + } + } private LazyLoad _MaxRNO; public int? MaxRNO {