Exemplo n.º 1
0
 protected void OnPlotChanged(AxisVariable ox, AxisVariable oy, PlotData data)
 {
     if (PlotChanged != null)
     {
         PlotChanged(ox, oy, data);
     }
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 public void SetOyVariable(AxisVariable y)
 {
     this.UpdateLocalOyPlotVariable(y);
     this.psychrometricChartModel.SetOyVariable(this.yPlotVariable);
     this.UpdateCurrentStateOrProcess();
 }
Exemplo n.º 8
0
 public void SetOxVariable(AxisVariable x)
 {
     this.UpdateLocalOxPlotVariable(x);
     this.psychrometricChartModel.SetOxVariable(this.xPlotVariable);
     this.UpdateCurrentStateOrProcess();
 }