protected void OnPlotChanged(AxisVariable ox, AxisVariable oy, PlotData data) { if (PlotChanged != null) { PlotChanged(ox, oy, data); } }
public PlotData GetPlotData(AxisVariable x, AxisVariable y) { this.UpdateLocalOxPlotVariable(x); this.UpdateLocalOyPlotVariable(y); HumidityChartData hcData = this.psychrometricChartModel.GetPlotData(this.xPlotVariable, this.yPlotVariable); return(this.ConvertToPlotData(hcData)); }
public static AxisVariable ConvertToAxisVariable(PlotVariable pv) { // Note: this also converts the values from model's default Unit System to the current Unit System string currentUnit = UnitSystemService.GetInstance().GetUnitAsString(pv.Variable.Type); double currentMin = UnitSystemService.GetInstance().ConvertFromSIValue(pv.Variable.Type, pv.Min); double currentMax = UnitSystemService.GetInstance().ConvertFromSIValue(pv.Variable.Type, pv.Max); Range currentRange = new Range((float)currentMin, (float)currentMax); AxisVariable av = new AxisVariable(pv.Variable.Name, currentUnit, currentRange); return av; }
private void psychrometricChartModel_HumidityChartChanged(PlotVariable ox, PlotVariable oy, HumidityChartData data) { this.xPlotVariable = ox; this.yPlotVariable = oy; AxisVariable x = UI.ConvertToAxisVariable(ox); AxisVariable y = UI.ConvertToAxisVariable(oy); PlotData pd = this.ConvertToPlotData(data); this.OnPlotChanged(x, y, pd); }
private ArrayList ConvertToAxisVariables(ArrayList plotList) { ArrayList axisList = new ArrayList(); IEnumerator en = plotList.GetEnumerator(); while (en.MoveNext()) { PlotVariable pv = (PlotVariable)en.Current; AxisVariable av = UI.ConvertToAxisVariable(pv); axisList.Add(av); } return(axisList); }
private void UpdateLocalOyPlotVariable(AxisVariable y) { // set the local yPlotVariable if changed if (!y.Name.Equals(this.yPlotVariable.Variable.Name)) { this.yPlotVariable = this.GetPlotVariableFromList(y.Name, this.yPlotVariables); } PhysicalQuantity pq = this.yPlotVariable.Variable.Type; this.yPlotVariable.Min = UnitSystemService.GetInstance().ConvertToSIValue(pq, (double)y.Range.Min); this.yPlotVariable.Max = UnitSystemService.GetInstance().ConvertToSIValue(pq, (double)y.Range.Max); }
public void SetOyVariable(AxisVariable y) { this.UpdateLocalOyPlotVariable(y); this.psychrometricChartModel.SetOyVariable(this.yPlotVariable); this.UpdateCurrentStateOrProcess(); }
public void SetOxVariable(AxisVariable x) { this.UpdateLocalOxPlotVariable(x); this.psychrometricChartModel.SetOxVariable(this.xPlotVariable); this.UpdateCurrentStateOrProcess(); }