public PsychrometricsViewModel(bool isDemo, bool isInternationalSystemOfUnits_IS_)
 {
     IsInternationalSystemOfUnits_IS_ = isInternationalSystemOfUnits_IS_;
     IsDemo = isDemo;
     PsychrometricsInputData          = new PsychrometricsInputData(IsDemo, IsInternationalSystemOfUnits_IS_);
     PsychrometricsOutputData         = new PsychrometricsOutputData(IsInternationalSystemOfUnits_IS_);
     PsychrometricsCalculationLibrary = new PsychrometricsCalculationLibrary();
     PsychrometricsData = new PsychrometricsData();
 }
        public bool CalculatePsychrometrics(bool isElevation, out string errorMessage)
        {
            try
            {
                if (!FillPsychrometricsData(isElevation, out errorMessage))
                {
                    return(false);
                }

                if (!PsychrometricsCalculationLibrary.PsychrometricsCalculation(PsychrometricsData, out errorMessage))
                {
                    return(false);
                }

                PsychrometricsOutputData.FillDataTable(PsychrometricsData);

                return(true);
            }
            catch (Exception exception)
            {
                errorMessage = string.Format("Error in Psychrometrics calculation. Please check your input values. Exception Message: {0}", exception.Message);
                return(false);
            }
        }