From b8f6a4df10ed76d6b8224b15d15a001d0de90166 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 19 Nov 2008 13:59:54 +0000 Subject: [PATCH] --- .../Extension/DisplayText.cs | Bin 64228 -> 64314 bytes .../Extension/DocVersionExt.cs | 4 +-- .../Extension/FolderExt.cs | 4 +-- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 33 ++++++++++++++---- .../VEPROMS.CSLA.Library/Extension/PartExt.cs | 2 +- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index e577b32fa8b2a7737d1174c81e7d7de7348e2dde..23d2429be4a12cea939aaddcdfa68aa8803eb46f 100644 GIT binary patch delta 53 zcmaFzm3h}U<_$kMCg*Tyi8?dnGvqO(F=R5NGlVdtGE^{>Fj!CKXO`T|#yL-7vXi99 J<~52IHv!~;5QP8$ delta 27 jcmdn>jrqw}<_$kMCiiUR+Z@0-Phzq|0>@@1C5xK?zyb^h diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs index bfb42c75..cd7870d1 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs @@ -114,7 +114,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return DocVersionConfig; } } @@ -359,7 +359,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return Get().DocVersionConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs index 96bfcca0..7752c61e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs @@ -88,7 +88,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return FolderConfig; } } @@ -221,7 +221,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return Get().FolderConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 8c757c72..c54831e0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -91,7 +91,7 @@ namespace VEPROMS.CSLA.Library { get { return MyContent.MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return null; } } @@ -593,7 +593,7 @@ namespace VEPROMS.CSLA.Library { get { - if (((MyContent.Type / 10000) == 2) && ((((int)MyContent.Type) % 10000) == 0)) return true; + if (((MyContent.Type / 10000) == 2) && ((((int)MyContent.Type) % 10000) == 1)) return true; return false; } } @@ -615,6 +615,19 @@ namespace VEPROMS.CSLA.Library return parent.IsInRNO; } } + /// + /// FormatStepType - Maps to step type in format file. All types map directly from step type in content + /// to step type in format except rno. The '39' is the RNO index in the format file. Note that we + /// could loop through the format's stepdata to find rnotype if we want this to be more flexible? + /// + public int FormatStepType + { + get + { + if (IsRNO) return 40; + else return (((int)MyContent.Type) % 10000); + } + } public ItemInfo FirstSibling { get @@ -1078,8 +1091,8 @@ namespace VEPROMS.CSLA.Library { get { return MyContent.MyFormat; } } - private DynamicTypeDescriptor _MyConfig=null; - public DynamicTypeDescriptor MyConfig + private ConfigDynamicTypeDescriptor _MyConfig=null; + public ConfigDynamicTypeDescriptor MyConfig { get { @@ -1093,10 +1106,18 @@ namespace VEPROMS.CSLA.Library case 1: _MyConfig = new SectionConfig(MyContent.Config); break; + case 2: + _MyConfig = new StepConfig(MyContent.Config); + break; } } return _MyConfig; } + set + { + if (_MyConfig == null) return; + // MyContent.Config = value; + } } //public bool HasStandardSteps() //{ return MyContent.ContentItemCount > 1; } @@ -1285,7 +1306,7 @@ namespace VEPROMS.CSLA.Library public ProcedureConfig ProcedureConfig { get { return (_ProcedureConfig != null ? _ProcedureConfig : _ProcedureConfig = new ProcedureConfig(this)); } } #endregion - public new DynamicTypeDescriptor MyConfig + public new ConfigDynamicTypeDescriptor MyConfig { get { return ProcedureConfig ; } } @@ -1402,7 +1423,7 @@ namespace VEPROMS.CSLA.Library public SectionConfig SectionConfig { get { return (_SectionConfig != null ? _SectionConfig : _SectionConfig = new SectionConfig(this)); } } #endregion - public new DynamicTypeDescriptor MyConfig + public new ConfigDynamicTypeDescriptor MyConfig { get { return SectionConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs index 077beab4..63fe2b1b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs @@ -120,7 +120,7 @@ namespace VEPROMS.CSLA.Library { get { return null; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return null; } }