141 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			141 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Text;
 | |
| using System.ComponentModel;
 | |
| using System.Xml;
 | |
| 
 | |
| namespace VEPROMS.CSLA.Library
 | |
| {
 | |
| 	#region PageStyles
 | |
| 	[TypeConverter(typeof(vlnListConverter<PageStyles, PageStyle>))]
 | |
| 	public class PageStyles : vlnFormatList<PageStyle>
 | |
| 	{
 | |
| 		public PageStyles(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
 | |
| 	}
 | |
| 	#endregion
 | |
| 	#region PageStyle
 | |
| 	public class PageStyle : vlnFormatItem
 | |
| 	{
 | |
| 		#region Constructor
 | |
| 		public PageStyle(XmlNode xmlNode) : base(xmlNode) { }
 | |
| 		public PageStyle() : base() { }
 | |
| 		#endregion
 | |
| 		#region Business Methods
 | |
| 		private LazyLoad<string> _Name;
 | |
| 		[DisplayName("Name")]
 | |
| 		[Description("Page Style Name")]
 | |
| 		public string Name
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return LazyLoad(ref _Name, "@Name");
 | |
| 			}
 | |
| 		}
 | |
| 		private LazyLoad<int?> _Index;
 | |
| 		[DisplayName("Index")]
 | |
| 		[Description("Page Style Index")]
 | |
| 		public int? Index
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return LazyLoad(ref _Index, "@Index");
 | |
| 			}
 | |
| 		}
 | |
| 		private PageItems _PageItems;
 | |
| 		public PageItems PageItems
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return (_PageItems == null)? _PageItems = new PageItems(SelectNodes("Item")): _PageItems;
 | |
| 			}
 | |
| 		}
 | |
| 		#endregion
 | |
| 		#region Override ToString
 | |
| 		public override string ToString()
 | |
| 		{
 | |
| 			return string.Format("{0:D2} - {1}", Index, Name);
 | |
| 		}
 | |
| 		#endregion
 | |
| 	}
 | |
| 	#endregion
 | |
| 	#region PageItems
 | |
| 	[TypeConverter(typeof(vlnListConverter<PageItems, PageItem>))]
 | |
| 	public class PageItems : vlnFormatList<PageItem>
 | |
| 	{
 | |
| 		public PageItems(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
 | |
| 	}
 | |
| 	#endregion
 | |
| 	#region PageItem
 | |
| 	public class PageItem : vlnFormatItem
 | |
| 	{
 | |
| 		#region Constructor
 | |
| 		public PageItem(XmlNode xmlNode) : base(xmlNode) { }
 | |
| 		public PageItem() : base() { }
 | |
| 		#endregion
 | |
| 		#region Business Methods
 | |
| 		private VE_Font _Font;
 | |
| 		[Category("Font")]
 | |
| 		[DisplayName("Font")]
 | |
| 		[Description("Font")]
 | |
| 		public VE_Font Font
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return (_Font == null) ?_Font = new VE_Font(XmlNode): _Font;
 | |
| 			}
 | |
| 		}
 | |
| 		private LazyLoad<string> _Token;
 | |
| 		[Category("Content")]
 | |
| 		[DisplayName("Content")]
 | |
| 		[Description("Item Content")]
 | |
| 		public string Token
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return LazyLoad(ref _Token, "@Token");
 | |
| 			}
 | |
| 		}
 | |
| 		private LazyLoad<float?> _Row;
 | |
| 		[Category("Location")]
 | |
| 		[DisplayName("Vertical Position")]
 | |
| 		[Description("Vertical Position")]
 | |
| 		public float? Row
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return LazyLoad(ref _Row, "@Row");
 | |
| 			}
 | |
| 		}
 | |
| 		private LazyLoad<float?> _Col;
 | |
| 		[Category("Location")]
 | |
| 		[DisplayName("Horizontal Position")]
 | |
| 		[Description("Horizontal Position")]
 | |
| 		public float? Col
 | |
| 		{
 | |
| 			get
 | |
| 			{
 | |
| 				return LazyLoad(ref _Col, "@Col");
 | |
| 			}
 | |
| 		}
 | |
| 		private LazyLoad<E_Justify?> _Justify;
 | |
| 		public E_Justify? Justify
 | |
| 		{ 
 | |
| 			get 
 | |
| 			{
 | |
| 				return LazyLoad<E_Justify>(ref _Justify, "@Justify");
 | |
| 			} 
 | |
| 		}
 | |
| 		#endregion
 | |
| 		#region Override ToString
 | |
| 		public override string ToString()
 | |
| 		{
 | |
| 			//return string.Format("({0:D5},{1:D5}) - {2}",Row,Col,Token);
 | |
| 			return Token;
 | |
| 		}
 | |
| 		public override string GetPDDisplayName()
 | |
| 		{ return string.Format("({0},{1})",Row,Col); }
 | |
| 		#endregion
 | |
| 	}
 | |
| 	#endregion
 | |
| }
 |