diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 6fd11b59..c0dd7594 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1982,7 +1982,7 @@ namespace VEPROMS.CSLA.Library { get { - return (_ReplaceSymbolCharList == null) ? _ReplaceSymbolCharList = new ReplaceSymbolCharList(SelectNodes("ReplaceSymbolChars/ReplaceChar")) : _ReplaceSymbolCharList; + return (_ReplaceSymbolCharList == null) ? _ReplaceSymbolCharList = new ReplaceSymbolCharList(SelectNodes("ReplaceSymbolChars/ReplaceChar"),MyFormat) : _ReplaceSymbolCharList; } set { _ReplaceSymbolCharList = value; } } @@ -3010,10 +3010,18 @@ namespace VEPROMS.CSLA.Library #endregion #region ReplaceChar [TypeConverter(typeof(ExpandableObjectConverter))] - public class ReplaceChar : vlnFormatItem + public class ReplaceChar : vlnFormatItem, IVlnIndexedFormatItem { public ReplaceChar(XmlNode xmlNode) : base(xmlNode) { } public ReplaceChar() : base() { } + private LazyLoad _Index; + public int? Index + { + get + { + return LazyLoad(ref _Index, "@Index"); + } + } [Category("Strings")] private LazyLoad _Unicode; public string Unicode @@ -3072,24 +3080,34 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _Size, "@Size"); } } - //public override string GetPDDisplayName() - //{ return Unicode; } - //public override string GetPDDescription() - //{ return string.Format("Replace '{0}' with '{1}'", Unicode, Replace); } - //public override string GetPDCategory() - //{ return "Chars to Replace"; } - //public override string ToString() - //{ - // return Replace; - //} + public override string GetPDDisplayName() + { return Unicode; } + public override string GetPDDescription() + { return string.Format("Replace '{0}' with '{1}'", Unicode, Replace); } + public override string GetPDCategory() + { return "Chars to Replace"; } + public override string ToString() + { + return Replace; + } } #endregion #region ReplaceSymbolCharList - [TypeConverter(typeof(vlnListConverter))] - public class ReplaceSymbolCharList : vlnFormatList + [TypeConverter(typeof(vlnIndexedListConverter))] + public class ReplaceSymbolCharList : vlnIndexedFormatList { - public ReplaceSymbolCharList(XmlNodeList xmlNodeList) : base(xmlNodeList) { } + public ReplaceSymbolCharList(XmlNodeList xmlNodeList, IFormatOrFormatInfo myFormat) : base(xmlNodeList, myFormat) { } + public override vlnIndexedFormatList InheritedList + { + get + { + IFormatOrFormatInfo parentFormat = MyFormat.MyIParent; + if (parentFormat != null) + return parentFormat.PlantFormat.FormatData.SectData.ReplaceSymbolCharList; + return null; + } + } } #endregion #region StepSectionLayoutData