AODL.Document.Styles.ListStyle.AutomaticAddListLevelStyles C# (CSharp) Method

AutomaticAddListLevelStyles() public method

Add all possible ListLevelStyle objects automatically. Throws exception, if there are already ListLevelStyles which could'nt removed.
public AutomaticAddListLevelStyles ( ListStyles typ ) : void
typ ListStyles The Liststyle bullet, numbered, ..s
return void
		public void AutomaticAddListLevelStyles(ListStyles typ)
		{
			if (this.Node.ChildNodes.Count != 0)
			{
				foreach(XmlNode xn in this.Node.ChildNodes)
					this.Node.RemoveChild(xn);
			}

			this.ListlevelStyles.Clear();

			for(int i = 1; i <= 10; i++)
			{
				ListLevelStyle style		= new ListLevelStyle(this.Document, this, typ, i);
				this.ListlevelStyles.Add(style);
				//this.Document.Styles.Add(style);
			}

			foreach(ListLevelStyle lls in this.ListlevelStyles)
				this.Node.AppendChild(lls.Node);
		}