From fd3522836b1157211cd87eb1f41138a16c3a4666 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 4 Feb 2009 13:16:21 +0000 Subject: [PATCH] --- .../Extension/DisplayText.cs | Bin 63398 -> 63404 bytes .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 53 +++++++++++++++++- PROMS/VEPROMS.CSLA.Library/Format/ENums.cs | 11 ++++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index 3dac9f0f3ec2f9d57e2abbc5e06fb78f759af957..973c105f6a6c55ea8ac99c5b87624903fb9cbc7c 100644 GIT binary patch delta 22 ecmZ4Xo_WoC<_%SICfh9Fm~1pVW%GkM$D#m)BnyWC delta 16 YcmZ4Uo_X1O<_%SI7!5Wz&e4tr07dr)ga7~l diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 62cc6fd2..761e779d 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -481,6 +481,36 @@ namespace VEPROMS.CSLA.Library } } #endregion + public bool IsCautionStructure + { + get + { + return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.Caution)); + } + } + public bool IsNoteStructure + { + get + { + return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.Note)); + } + } + + public bool IsCautionStructureFirstSib + { + get + { + return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Caution)); + } + } + public bool IsNoteStructureFirstSib + { + get + { + return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Note)); + } + } + public bool IsType(string type) { int stepType = ((int)MyContent.Type) % 10000; @@ -616,6 +646,27 @@ namespace VEPROMS.CSLA.Library return parent.IsInRNO; } } + public int RNOLevel + { + get + { + return (IsHigh?0:(IsRNO?1:0)+((ItemInfo)ActiveParent).RNOLevel); + } + } + public int Columns + { + get + { + // check config value on my section, if null/default use Pmode of active format + SectionInfo si = SectionInfo.Get(ActiveSection.ItemID); //ActiveSection as SectionInfo; + if (si != null) + { + if (si.SectionConfig.Section_ColumnMode != SectionConfig.SectionColumnMode.Default) + return (int)si.SectionConfig.Section_ColumnMode; + } + return ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode ?? 2; + } + } /// /// 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 @@ -643,7 +694,7 @@ namespace VEPROMS.CSLA.Library get { ItemInfo temp = this; - while (temp.NextItems[0] != null) temp = temp.NextItems[0]; + while (temp.NextItems != null) temp = temp.NextItems[0]; return temp; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs index c13d21a3..ccaab2ab 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs @@ -208,5 +208,16 @@ namespace VEPROMS.CSLA.Library Plackeep = 0x20000, // Do replace in PlaceKeepers InSecTitle = 0x40000 } + public enum E_ArrowKeys : uint + { + Up = 1, + Down = 2, + Right = 3, + Left = 4, + CtrlUp = 5, + CtrlDown = 6, + CtrlRight = 7, + CtrlLeft = 8 + } #endregion }