Beispiel #1
0
        public void RefreshYAxesUnit()
        {
            string unit;
            string airFlowUnit      = UnitQuery.GetUnitDescription(EUnitType.AirFlow, (int)Method.AirFlow);
            string capacityUnit     = UnitQuery.GetUnitDescription(EUnitType.Capacity, (int)Method.CoolingCapacity);
            string enthalpyUnit     = UnitQuery.GetUnitDescription(EUnitType.Enthalpy, (int)Method.Enthalpy);
            string temperatureUnit  = UnitQuery.GetUnitDescription(EUnitType.Temperature, (int)Method.Temperature);
            string pressureUnit     = UnitQuery.GetUnitDescription(EUnitType.Pressure, (int)Method.Pressure);
            string diffPressureUnit = UnitQuery.GetUnitDescription(EUnitType.DiffPressure, (int)Method.DiffPressure);
            string atmPressureUnit  = UnitQuery.GetUnitDescription(EUnitType.AtmPressure, (int)Method.AtmPressure);

            foreach (YAxisRow row in YAxisRows)
            {
                unit = "";

                switch (row.Name)
                {
                case "AirFlow":
                    unit = airFlowUnit;
                    break;

                case "Capacity":
                case "EER_COP":
                    unit = capacityUnit;
                    break;

                case "Enthalpy":
                case "Heat":
                    unit = enthalpyUnit;
                    break;

                case "Temperature":
                    unit = temperatureUnit;
                    break;

                case "Pressure":
                    unit = pressureUnit;
                    break;

                case "DiffPressure":
                    unit = diffPressureUnit;
                    break;

                case "AtmPressure":
                    unit = atmPressureUnit;
                    break;
                }

                row.Unit = (unit == "") ? row.Unit : unit;
            }

            foreach (YAxisRow row in YAxisRows)
            {
                viewGraph.AxesY[row.AxisNo].Title.Text = row.DescriptionUnit;
            }
        }
Beispiel #2
0
        public void RefreshUnit()
        {
            string unit, capacityUnit;
            string airFlowUnit      = UnitQuery.GetUnitDescription(EUnitType.AirFlow, (int)Method.AirFlow);
            string enthalpyUnit     = UnitQuery.GetUnitDescription(EUnitType.Enthalpy, (int)Method.Enthalpy);
            string temperatureUnit  = UnitQuery.GetUnitDescription(EUnitType.Temperature, (int)Method.Temperature);
            string pressureUnit     = UnitQuery.GetUnitDescription(EUnitType.Pressure, (int)Method.Pressure);
            string diffPressureUnit = UnitQuery.GetUnitDescription(EUnitType.DiffPressure, (int)Method.DiffPressure);
            string atmPressureUnit  = UnitQuery.GetUnitDescription(EUnitType.AtmPressure, (int)Method.AtmPressure);

            if (context.Condition.Schedules[context.Index].IndoorMode == EIndoorMode.Heating)
            {
                capacityUnit = UnitQuery.GetUnitDescription(EUnitType.Capacity, (int)Method.HeatingCapacity);
            }
            else
            {
                capacityUnit = UnitQuery.GetUnitDescription(EUnitType.Capacity, (int)Method.CoolingCapacity);
            }

            foreach (SeriesRow row in PlotSeriesRows)
            {
                switch (row.UnitType)
                {
                case "AirFlow":
                    row.UnitFrom = airFlowUnit;
                    break;

                case "Capacity":
                case "EER_COP":
                    row.UnitFrom = capacityUnit;
                    break;

                case "Enthalpy":
                case "Heat":
                    row.UnitFrom = enthalpyUnit;
                    break;

                case "Temperature":
                    row.UnitFrom = temperatureUnit;
                    break;

                case "Pressure":
                    row.UnitFrom = pressureUnit;
                    break;

                case "DiffPressure":
                    row.UnitFrom = diffPressureUnit;
                    break;

                case "AtmPressure":
                    row.UnitFrom = atmPressureUnit;
                    break;
                }
            }

            plotSeriesGridView.RefreshData();

            foreach (YAxisRow row in YAxisRows)
            {
                unit = "";

                switch (row.Name)
                {
                case "AirFlow":
                    unit = atmPressureUnit;
                    break;

                case "Capacity":
                case "EER_COP":
                    unit = capacityUnit;
                    break;

                case "Enthalpy":
                case "Heat":
                    unit = enthalpyUnit;
                    break;

                case "Temperature":
                    unit = temperatureUnit;
                    break;

                case "Pressure":
                    unit = pressureUnit;
                    break;

                case "DiffPressure":
                    unit = diffPressureUnit;
                    break;

                case "AtmPressure":
                    unit = atmPressureUnit;
                    break;
                }

                row.Unit = (unit == "") ? row.Unit : unit;
            }

            foreach (YAxisRow row in YAxisRows)
            {
                viewGraph.AxesY[row.AxisNo].Title.Text = row.DescriptionUnit;
            }
        }
Beispiel #3
0
        private void InitializeYAxes()
        {
            int    i    = 0;
            string unit = "None";

            YAxisRows = new List <YAxisRow>();

            foreach (EUnitType unitType in Enum.GetValues(typeof(EUnitType)))
            {
                if (unitType == EUnitType.None)
                {
                    continue;
                }
                if (unitType == EUnitType.Time)
                {
                    continue;
                }

                switch (unitType)
                {
                case EUnitType.Current:
                case EUnitType.Voltage:
                case EUnitType.Frequency:
                case EUnitType.Flux:
                case EUnitType.Ratio:
                case EUnitType.HumidityRatio:
                case EUnitType.Power:
                case EUnitType.PowerComsumption:
                case EUnitType.Velocity:
                case EUnitType.Volume:
                    unit = UnitQuery.GetUnitDescription(unitType);
                    break;

                case EUnitType.AirFlow:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.AirFlow);
                    break;

                case EUnitType.Capacity:
                case EUnitType.EER_COP:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.CoolingCapacity);
                    break;

                case EUnitType.Enthalpy:
                case EUnitType.Heat:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.Enthalpy);
                    break;

                case EUnitType.Temperature:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.Temperature);
                    break;

                case EUnitType.Pressure:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.Pressure);
                    break;

                case EUnitType.DiffPressure:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.DiffPressure);
                    break;

                case EUnitType.AtmPressure:
                    unit = UnitQuery.GetUnitDescription(unitType, (int)Method.AtmPressure);
                    break;
                }

                YAxisRows.Add(new YAxisRow(-1, i++, false, EAxisAlign.Left,
                                           unitType.ToString(), unitType.ToDescription(), unit, -100, 100, -100, 100));
            }

            YAxisRows[0].Checked = true;
            YAxisRows[1].Checked = true;
            YAxisRows[2].Checked = true;
        }
Beispiel #4
0
 public void SetPlotSeriesUnit(int index, EUnitType type, int unit)
 {
     PlotSeriesRows[index].UnitFrom =
         UnitQuery.GetUnitDescription(type, unit);
 }