AODL.Document.Import.OpenDocument.NodeProcessors.MainContentProcessor.CreateEventListener C# (CSharp) Метод

CreateEventListener() публичный Метод

Creates the event listener.
public CreateEventListener ( XmlNode eventListenerNode ) : EventListener
eventListenerNode System.Xml.XmlNode The event listener node.
Результат AODL.Document.Content.OfficeEvents.EventListener
		public EventListener CreateEventListener(XmlNode eventListenerNode)
		{
			try
			{
				EventListener eventListener	= new EventListener(this._document, eventListenerNode);

				return eventListener;
			}
			catch(Exception ex)
			{
				throw new AODLException("Exception while trying to create a EventListener.", ex);
			}
		}

Usage Example

//		/// <summary>
//		/// Contents the collection_ inserted.
//		/// </summary>
//		/// <param name="index">The index.</param>
//		/// <param name="value">The value.</param>
//		protected void ContentCollection_Inserted(int index, object value)
//		{
//			this.Node.AppendChild(((IContent)value).Node);
//		}

		#region IContent Member old

//		private TextDocument _document;
//		/// <summary>
//		/// The TextDocument to which this draw-area is bound.
//		/// </summary>
//		public TextDocument Document
//		{
//			get
//			{
//				return this._document;
//			}
//			set
//			{
//				this._document = value;
//			}
//		}
//
//		private XmlNode _node;
//		/// <summary>
//		/// The XmlNode.
//		/// </summary>
//		public XmlNode Node
//		{
//			get
//			{
//				return this._node;
//			}
//			set
//			{
//				this._node = value;
//			}
//		}
//
//		/// <summary>
//		/// A draw:area-rectangle doesn't have a style-name.
//		/// </summary>
//		/// <value>The name</value>
//		public string Stylename
//		{
//			get
//			{
//				return null;
//			}
//			set
//			{
//			}
//		}
//
//		/// <summary>
//		/// A draw:area-rectangle doesn't have a style.
//		/// </summary>
//		public IStyle Style
//		{
//			get
//			{
//				return null;
//			}
//			set
//			{
//			}
//		}
//
//		/// <summary>
//		/// A draw:area-rectangle doesn't contain text.
//		/// </summary>
//		public ITextCollection TextContent
//		{
//			get
//			{
//				return null;
//			}
//			set
//			{
//			}
//		}

		#endregion	

		#region ICloneable Member
		/// <summary>
		/// Create a deep clone of this EventListener object.
		/// </summary>
		/// <remarks>A possible Attached Style wouldn't be cloned!</remarks>
		/// <returns>
		/// A clone of this object.
		/// </returns>
		public object Clone()
		{
			EventListener eventListenerClone	= null;

			if (this.Document != null && this.Node != null)
			{
				MainContentProcessor mcp		= new MainContentProcessor(this.Document);
				eventListenerClone				= mcp.CreateEventListener(this.Node.CloneNode(true));
			}

			return eventListenerClone;
		}