public ICsiContainer ChangeItemByIndex(int index) { CsiContainer sourceElement = new CsiContainer(this.GetOwnerDocument(), "__listItem", this); sourceElement.SetAttribute("__listItemAction", "change"); CsiXmlHelper.FindCreateSetValue(sourceElement, "__index", Convert.ToString(index)); return(sourceElement); }
public void DeleteItemByRef(string name, string level) { ICsiContainer sourceElement = new CsiContainer(this.GetOwnerDocument(), "__listItem", this); sourceElement.SetAttribute("__listItemAction", "delete"); CsiXmlHelper.FindCreateSetValue2(sourceElement, "__key", "__name", name, true); CsiXmlHelper.FindCreateSetValue3(sourceElement, "__key", "__level", "__name", level, true); }
public ICsiContainer AppendItem(string name, string level) { CsiContainer container = new CsiContainer(this.GetOwnerDocument(), "__listItem", this); container.SetAttribute("__listItemAction", "add"); container.SetRef(name, level); return(container); }
public ICsiContainer GetItemByRef(string name, string level) { CsiContainer impl = null; IEnumerator enumerator = this.GetAllChildren().GetEnumerator(); while (enumerator.MoveNext()) { CsiObject current = enumerator.Current as CsiObject; impl = new CsiContainer(this.GetOwnerDocument(), current.GetDomElement()); if ((level != null) && (level.Length == 0)) { level = null; } if (impl.Equals(name, level)) { return(impl); } impl = null; } return(impl); }