Leaf Charter integration
This commit is contained in:
@@ -12,19 +12,22 @@ using LeafWeb.Web.Charter;
|
||||
|
||||
namespace LeafWeb.Web.Controllers
|
||||
{
|
||||
public class LeafCharterController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
public class LeafCharterController : ControllerBase
|
||||
{
|
||||
public ActionResult Index(int leafInputFileId)
|
||||
{
|
||||
return View();
|
||||
return View(leafInputFileId);
|
||||
}
|
||||
|
||||
public ActionResult LeafCharts(int number)
|
||||
public ActionResult LeafCharts(int leafInputFileId, int number)
|
||||
{
|
||||
var fileInfo = new FileInfo(@"C:\Users\poprhythm\Documents\code\LeafWeb\Core.Tests\Parsers\LeafOutputData\cntrlcomparison_Wild Capsicum.csv");
|
||||
var leafInputFile = DataService.GetLeafInputFile(leafInputFileId);
|
||||
var leafOutputFile = leafInputFile.LeafOutputFiles.FirstOrDefault(f => f.Filename.StartsWith("cntrlcomparison"));
|
||||
//if (leafOutputFile == null)
|
||||
// return View(); // TODO: break
|
||||
|
||||
CntrlComparison[] cntrlComparison;
|
||||
using (var parser = new CntrlComparisonParser(fileInfo))
|
||||
CntrlComparison[] cntrlComparison;
|
||||
using (var parser = new CntrlComparisonParser(leafOutputFile.Contents))
|
||||
cntrlComparison = parser.Parse();
|
||||
|
||||
var curveData = CurveDataConverter.Convert(cntrlComparison).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user