public DownloadAsSVG ( List |
||
lectures | List |
List of lectures. |
title | string | Title displayed at top-left corner of the SVG. |
created | System.DateTime | Date the timetable was created from config. |
linkToInfo | string | Hyperlink to webpage with additional information. |
리턴 | System.Web.Mvc.ActionResult |
public ActionResult DownloadAsSVG(List<TimetableField> lectures,string title,DateTime created, string linkToInfo)
{
SvgGenerator gen = new SvgGenerator();
string text = gen.generateSVG(lectures, title, created, linkToInfo);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(text);
var res = new FileContentResult(buffer, "text/plain");
res.FileDownloadName = "FJFIrozvrh.svg";
return res;
}
public ActionResult ExportToSVG() { ImportExport instance = new ImportExport(); return instance.DownloadAsSVG(M.CustomTimetableFields, M.SelectedTimetable.m_timetableInfo.TimetableLabel, M.SelectedTimetable.m_timetableInfo.Created, M.SelectedTimetable.m_timetableInfo.LinkToAdditionalInformation); }