public HelpFileNode CreateChild(string caption, string url) { HelpFileNode hfn = new HelpFileNode(caption, url); hfn.parentNode = this; this.childNodes.Add(hfn); return(hfn); }
/// <summary> /// /// </summary> /// <param name="hhcWriter"></param> /// <param name="hfn"></param> private void WriteNodeUrlToProjectFile(StreamWriter hhcWriter, HelpFileNode hfn) { if (hfn.Url != string.Empty) { hhcWriter.WriteLine(hfn.Url); } foreach (HelpFileNode childHfn in hfn.ChildNodes) { WriteNodeUrlToProjectFile(hhcWriter, childHfn); } }
/// <summary> /// /// </summary> /// <param name="hhcWriter"></param> /// <param name="hfn"></param> private void WriteNodeToContentsFile(StreamWriter hhcWriter, HelpFileNode hfn) { hhcWriter.WriteLine(hfn.ToString()); if (hfn.ChildNodes.Count > 0) { hhcWriter.WriteLine("<UL>"); foreach (HelpFileNode childHfn in hfn.ChildNodes) { WriteNodeToContentsFile(hhcWriter, childHfn); } hhcWriter.WriteLine("</UL>"); } }
/// <summary> /// /// </summary> public HelpFileWriter() { this.rootNode = new HelpFileNode(); Files = new ArrayList(); }
/// <summary> /// Checks to see if the specified object exsits in the collection /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool Contains(HelpFileNode obj) { return(this.List.Contains(obj)); }
/// <summary> /// IndexOf /// </summary> /// <param name="obj"></param> /// <returns></returns> public int IndexOf(HelpFileNode obj) { return(this.List.IndexOf(obj)); }
/// <summary> /// /// </summary> /// <param name="obj"></param> public void Remove(HelpFileNode obj) { this.List.Remove(obj); }
/// <summary> /// /// </summary> /// <param name="index"></param> /// <param name="obj"></param> public void Insert(int index, HelpFileNode obj) { this.List.Insert(index, obj); }
/// <summary> /// /// </summary> /// <param name="obj"></param> public void Add(HelpFileNode obj) { this.List.Add(obj); }