public static HmCategory[] GetCategories(XmlNodeList list) { uint i = 0; XmlSerializer serializer = new XmlSerializer(typeof(Group)); HmCategory[] categories = new HmCategory[list.Count]; foreach (XmlNode node in list ) categories[i++] = new HmCategory ((Group)serializer.Deserialize(new StringReader(node.OuterXml))); return categories; }
public void RefreshCategories() { Gtk.TreeIter iter; HmCategory[] categories = HmCategory.GetCategories(this.hm.DownloadGroups()); foreach (HmCategory category in categories) { category.Dump(); iter = categoryListStore.Append(); categoryListStore.SetValue(iter, 0, category); } Logger.Debug("Fetching Categories"); }
public static HmCategory[] GetCategories(XmlNodeList list) { uint i = 0; XmlSerializer serializer = new XmlSerializer(typeof(Group)); HmCategory[] categories = new HmCategory[list.Count]; foreach (XmlNode node in list) { categories[i++] = new HmCategory((Group)serializer.Deserialize(new StringReader(node.OuterXml))); } return(categories); }