public ActionResult Index(Font font, IEnumerable<HttpPostedFileBase> fileUpload) { FontLoader loadFont = new FontLoader(); loadFont.FontFileLoad(fileUpload, font.Name); loadFont.WriteFontDataXml(font.Name, font.Price, font.Types); return View("Thanx"); }
public Font[] GetAllFonts() { var fontsList = new List<Font>(); var nodeList = LoadFile().GetElementsByTagName("Font"); foreach (XmlNode fontElement in nodeList) { var font = new Font { Name = GetName(fontElement), CssName = GetCssName(fontElement), FontUrl = GetFontUrl(fontElement), Type = GetType(fontElement), Price = GetPrice(fontElement) }; fontsList.Add(font); } return fontsList.ToArray(); }