CntrlComparison parsing
This commit is contained in:
@@ -6,23 +6,24 @@ using System.IO;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
using LeafWeb.Core.Charter;
|
||||
using LeafWeb.Core.Models;
|
||||
|
||||
namespace LeafWeb.Web.Charter
|
||||
{
|
||||
public partial class LeafWebCharter : UserControl
|
||||
{
|
||||
protected void ReadFile(StreamReader sr, ref String errMsg)
|
||||
protected void ReadFile(StreamReader sr, ref string errMsg)
|
||||
{
|
||||
var pisOut = new CntrlComparison();
|
||||
if (!pisOut.ReadFromStream(sr, ref errMsg))
|
||||
var pisOut = new CurveDataList();
|
||||
if (!pisOut.ReadFromStream(sr))
|
||||
{
|
||||
ErrorLBL.Text = errMsg;
|
||||
ErrorLBL.Visible = true;
|
||||
return;
|
||||
}
|
||||
Session["LeafChartData"] = pisOut;
|
||||
var aCopy = (CntrlComparison) Session["LeafChartData"];
|
||||
var aCopy = (CurveDataList) Session["LeafChartData"];
|
||||
|
||||
// The data was successfully read from the file. We must now
|
||||
// display the curveIDs from the file and prompt the user to pick
|
||||
@@ -31,12 +32,12 @@ namespace LeafWeb.Web.Charter
|
||||
var curveDT = new DataTable();
|
||||
curveDT.Columns.Add(new DataColumn("curveID"));
|
||||
|
||||
var curveData = pisOut.GetCurveData();
|
||||
var curveData = pisOut.CurveData;
|
||||
for (var i = 0; i < curveData.Count; i++)
|
||||
{
|
||||
var aCurve = curveData[i];
|
||||
var dr = curveDT.NewRow();
|
||||
dr["curveID"] = aCurve.GetCurveId();
|
||||
dr["curveID"] = aCurve.CurveId;
|
||||
curveDT.Rows.Add(dr);
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ namespace LeafWeb.Web.Charter
|
||||
|
||||
|
||||
// cntrlcomparison
|
||||
public void ProduceCharts(CntrlComparison pisOut)
|
||||
public void ProduceCharts(CurveDataList pisOut)
|
||||
{
|
||||
// If the session has timed out, use the selected index from the GridView
|
||||
// to determine which job to chart.
|
||||
@@ -62,14 +63,14 @@ namespace LeafWeb.Web.Charter
|
||||
// break;
|
||||
// }
|
||||
|
||||
var curveData = pisOut.GetCurveData();
|
||||
var curveData = pisOut.CurveData;
|
||||
var curve = curveData[1];
|
||||
|
||||
var curveId = curve.GetCurveId();
|
||||
CurveSeries(curveId, curve.CndctFixedCmpPntFixedParams(), ChartChloro1, ChartInter1, "Internal conductance fixed, compensation point and M-M constants fixed");
|
||||
CurveSeries(curveId, curve.CndctFixedCmpPntEstimatedParams(), ChartChloro2, ChartInter2, "Internal conductance fixed, compensation point and M-M constants estimated");
|
||||
CurveSeries(curveId, curve.CndctEstimatedCmpPntFixedParams(), ChartChloro3, ChartInter3, "Internal conductance estimated, compensation point and M-M constants fixed");
|
||||
CurveSeries(curveId, curve.CndctEstimatedCmpPntEstimatedParams(), ChartChloro4, ChartInter4, "Internal conductance estimated, compensation point and M-M constants estimated");
|
||||
var curveId = curve.CurveId;
|
||||
CurveSeries(curveId, curve.FixedCndFixedCmp, ChartChloro1, ChartInter1, "Internal conductance fixed, compensation point and M-M constants fixed");
|
||||
CurveSeries(curveId, curve.FixedCndEstimatedCmp, ChartChloro2, ChartInter2, "Internal conductance fixed, compensation point and M-M constants estimated");
|
||||
CurveSeries(curveId, curve.EstimatedCndFixedCmp, ChartChloro3, ChartInter3, "Internal conductance estimated, compensation point and M-M constants fixed");
|
||||
CurveSeries(curveId, curve.EstimatedCndEstimatedCmp, ChartChloro4, ChartInter4, "Internal conductance estimated, compensation point and M-M constants estimated");
|
||||
}
|
||||
|
||||
private static Chart GetChart()
|
||||
@@ -203,11 +204,9 @@ namespace LeafWeb.Web.Charter
|
||||
|
||||
private static void CurveSeries(string curveId, CurveParamSet paramSet, Chart chloroChart, Chart interChart, string chartTitle)
|
||||
{
|
||||
var paramSetAnet = paramSet.GetAnetMeasData();
|
||||
|
||||
var anetMeasChloro1 = paramSetAnet[0];
|
||||
var anetMeasChloro2 = paramSetAnet[1];
|
||||
var anetMeasChloro3 = paramSetAnet[2];
|
||||
var anetMeasChloro1 = paramSet.AnetMeasChloro1Data;
|
||||
var anetMeasChloro2 = paramSet.AnetMeasChloro2Data;
|
||||
var anetMeasChloro3 = paramSet.AnetMeasChloro3Data;
|
||||
|
||||
// Set the points for the symbol series for paramater set 1, chloroplastic
|
||||
setAnetMeasPoints(anetMeasChloro1, chloroChart.Series["Rubisco-limited"]);
|
||||
@@ -217,9 +216,9 @@ namespace LeafWeb.Web.Charter
|
||||
setAnetMeasPoints(anetMeasChloro3, tpuSeries);
|
||||
chloroChart.Series.Add(tpuSeries);
|
||||
|
||||
var anetMeasInter1 = paramSetAnet[3];
|
||||
var anetMeasInter2 = paramSetAnet[4];
|
||||
var anetMeasInter3 = paramSetAnet[5];
|
||||
var anetMeasInter1 = paramSet.AnetMeasInter1Data;
|
||||
var anetMeasInter2 = paramSet.AnetMeasInter2Data;
|
||||
var anetMeasInter3 = paramSet.AnetMeasInter3Data;
|
||||
|
||||
// Set the points for the symbol series for paramater set 1, intercellular
|
||||
setAnetMeasPoints(anetMeasInter1, interChart.Series["Rubisco-limited"]);
|
||||
@@ -229,18 +228,18 @@ namespace LeafWeb.Web.Charter
|
||||
setAnetMeasPoints(anetMeasInter3, tpuSeries);
|
||||
interChart.Series.Add(tpuSeries);
|
||||
|
||||
var acChloroList = paramSet.GetAcChloroData();
|
||||
var ajChloroList = paramSet.GetAjChloroData();
|
||||
var atChloroList = paramSet.GetAtChloroData();
|
||||
var acChloroList = paramSet.AcChloroData;
|
||||
var ajChloroList = paramSet.AjChloroData;
|
||||
var atChloroList = paramSet.AtChloroData;
|
||||
|
||||
// Set the points on the asymptote curve for parameter set 1, chloroplast
|
||||
setAsymptotePoints(acChloroList, chloroChart.Series["acCurve"]);
|
||||
setAsymptotePoints(ajChloroList, chloroChart.Series["ajCurve"]);
|
||||
setAsymptotePoints(atChloroList, chloroChart.Series["atCurve"]);
|
||||
|
||||
var acInterList = paramSet.GetAcInterData();
|
||||
var ajInterList = paramSet.GetAjInterData();
|
||||
var atInterList = paramSet.GetAtInterData();
|
||||
var acInterList = paramSet.AcInterData;
|
||||
var ajInterList = paramSet.AjInterData;
|
||||
var atInterList = paramSet.AtInterData;
|
||||
|
||||
// Set the points on the asymptote curve for parameter set 1, intercellular
|
||||
setAsymptotePoints(acInterList, interChart.Series["acCurve"]);
|
||||
@@ -251,8 +250,7 @@ namespace LeafWeb.Web.Charter
|
||||
var titleFont = new Font("Times New Roman", 12, FontStyle.Bold);
|
||||
|
||||
var title = new Title("LeafWeb curveID = " + curveId +
|
||||
"\n" + chartTitle);
|
||||
title.Font = titleFont;
|
||||
"\n" + chartTitle) {Font = titleFont};
|
||||
chloroChart.Titles.Add(title);
|
||||
interChart.Titles.Add(title);
|
||||
|
||||
|
||||
Binary file not shown.
+7
-5
@@ -143,8 +143,6 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Charter\CurveData.cs" />
|
||||
<Compile Include="Charter\CurveParamSet.cs" />
|
||||
<Compile Include="Charter\LeafWebCharter.ascx.cs">
|
||||
<DependentUpon>LeafWebCharter.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -152,8 +150,6 @@
|
||||
<Compile Include="Charter\LeafWebCharter.ascx.designer.cs">
|
||||
<DependentUpon>LeafWebCharter.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Charter\PiscalOutput.cs" />
|
||||
<Compile Include="Charter\XYPoint.cs" />
|
||||
<Compile Include="Controllers\LeafCharterController.cs" />
|
||||
<Compile Include="Controllers\PagesController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
@@ -173,7 +169,7 @@
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\Pages\DataRequirements.cshtml" />
|
||||
<Content Include="Scripts\jquery-1.9.1.min.map" />
|
||||
<Content Include="Views\LeafCharter\LeafCharter.cshtml" />
|
||||
<Content Include="Views\LeafCharter\Index.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
@@ -185,6 +181,12 @@
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Core\Core.csproj">
|
||||
<Project>{25baed75-7e75-4d11-90d9-358472054df6}</Project>
|
||||
<Name>Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
Reference in New Issue
Block a user