C# Class Rozvrh.Exporters.ImportExport

Class exporting to ICal and SVG format via ActionResult File. It also imports and exports lectures using XML serialization.
Exibir arquivo Open project: jandoubek/fjfi-rozvrh Class Usage Examples

Public Methods

Method Description
DownloadAsBITMAP ( List lectures, string title, System.DateTime created, string linkToInfo, string path, string format ) : System.Web.Mvc.FileResult

Exports lectures to bitmap format.

DownloadAsICAL ( List lectures, System.DateTime semStart, System.DateTime semEnd ) : System.Web.Mvc.ActionResult

Exports lectures to ICal format.

DownloadAsSVG ( List lectures, string title, System.DateTime created, string linkToInfo ) : System.Web.Mvc.ActionResult

Exports lectures to SVG file.

DownloadAsXML ( List lectures ) : System.Web.Mvc.ActionResult

Serializes lectures to XML file.

ImportExport ( ) : System
ImportXML ( System.Web.HttpPostedFileBase file ) : List

Deserialize XML of lectures.

Private Methods

Method Description
convertToExportFormat ( List lectures ) : List

Method Details

DownloadAsBITMAP() public method

Exports lectures to bitmap format.
public DownloadAsBITMAP ( List lectures, string title, System.DateTime created, string linkToInfo, string path, string format ) : System.Web.Mvc.FileResult
lectures List List of lectures.
title string Title displayed at top-left corner of the image.
created System.DateTime Date the timetable was created from config.
linkToInfo string Hyperlink to webpage with additional information.
path string Path to folder where temp files will be created and where Inkspace folder is.
format string Bitmap format to export ie. png jpg pdf
return System.Web.Mvc.FileResult

DownloadAsICAL() public method

Exports lectures to ICal format.
public DownloadAsICAL ( List lectures, System.DateTime semStart, System.DateTime semEnd ) : System.Web.Mvc.ActionResult
lectures List List of lectures.
semStart System.DateTime Beginning of the semester. Only Year, Month and Day are used.
semEnd System.DateTime End of the semester. Only Year, Month and Day are used.
return System.Web.Mvc.ActionResult

DownloadAsSVG() public method

Exports lectures to SVG file.
public DownloadAsSVG ( List lectures, string title, System.DateTime created, string linkToInfo ) : System.Web.Mvc.ActionResult
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.
return System.Web.Mvc.ActionResult

DownloadAsXML() public method

Serializes lectures to XML file.
public DownloadAsXML ( List lectures ) : System.Web.Mvc.ActionResult
lectures List List of lectures.
return System.Web.Mvc.ActionResult

ImportExport() public method

public ImportExport ( ) : System
return System

ImportXML() public method

Deserialize XML of lectures.
The XML cannot be deserialized.
public ImportXML ( System.Web.HttpPostedFileBase file ) : List
file System.Web.HttpPostedFileBase File posted by HTTP POST.
return List