AODL.Document.Content.Draw.Frame.Content_Inserted C# (CSharp) Method

Content_Inserted() private method

Content_s the inserted.
private Content_Inserted ( int index, object value ) : void
index int The index.
value object The value.
return void
		private void Content_Inserted(int index, object value)
		{
			if (value is Graphic)
			{
				if (((Graphic)value).Frame == null)
				{
					((Graphic)value).Frame = this;
					if (((Graphic)value).GraphicRealPath != null
					   && this.GraphicSourcePath == null)
						this.GraphicSourcePath = ((Graphic)value).GraphicRealPath;
					this.Node.AppendChild(((IContent)value).Node);
				}
				if (((IContent)value).Node != null)
				{
					if (((IContent)value).Node.ParentNode == null
					   || !((IContent)value).Node.ParentNode.Equals(this.Node))
					{
						this.Node.AppendChild(((IContent)value).Node);
					}
				}
			}
			else if (value is EmbedObject )
			{
				if (((EmbedObject)value).ObjectType =="chart")
				{
					if (this.Document.IsLoadedFile&&!((Chart)value).IsNewed )
					{
						this.Node .AppendChild (((Chart)value).ParentNode );
					}
					else
					{
						string  objectLink = "."+@"/"+((EmbedObject)value).ObjectName;
						
						this.Node .AppendChild (((Chart)value).CreateParentNode (objectLink) );
					}
				}
			}
			else
			{
				if (((IContent)value).Node != null)
				{
					if (((IContent)value).Node.ParentNode == null
					   || !((IContent)value).Node.ParentNode.Equals(this.Node))
					{
						this.Node.AppendChild(((IContent)value).Node);
					}
				}
			}
		}