AODL.Document.Styles.ListLevelStyle.NewXmlNode C# (CSharp) Method

NewXmlNode() private method

Create the XmlNode that represent the Style element.
private NewXmlNode ( ListStyles typ, int level ) : void
typ ListStyles The style name.
level int The level number which represent this style.
return void
		private void NewXmlNode(ListStyles typ, int level)
		{
			XmlAttribute xa		= null;
			if (typ == ListStyles.Bullet)
			{
				this.Node		= this.Document.CreateNode("list-level-style-bullet", "text");

				xa				= this.Document.CreateAttribute("style-name", "text");
				xa.Value		= "Bullet_20_Symbols";
				this.Node.Attributes.Append(xa);

				xa				= this.Document.CreateAttribute("bullet-char", "text");
				xa.Value		= "\u2022";
				this.Node.Attributes.Append(xa);

				this.AddTextPropertie();
			}
			else if (typ == ListStyles.Number)
			{
				this.Node		= this.Document.CreateNode("list-level-style-number", "text");

				xa				= this.Document.CreateAttribute("style-name", "text");
				xa.Value		= "Numbering_20_Symbols";
				this.Node.Attributes.Append(xa);

				xa				= this.Document.CreateAttribute("num-format", "style");
				xa.Value		= "1";
				this.Node.Attributes.Append(xa);				
			}
			else
				throw new Exception("Unknown ListStyles typ");

			xa				= this.Document.CreateAttribute("level", "text");
			xa.Value		= level.ToString();
			this.Node.Attributes.Append(xa);

			xa				= this.Document.CreateAttribute("num-suffix", "style");
			xa.Value		= ".";
			this.Node.Attributes.Append(xa);
		}