Esempio n. 1
0
        private void comboBoxFlowDirection_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (!this.inConstruction)
            {
                ErrorMessage error = null;

                HXRatingModelShellAndTube ratingModel = heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube;
                int idx = this.comboBoxFlowDirection.SelectedIndex;
                if (idx == HXRatingSimpleGenericValuesControl.INDEX_PARALLEL)
                {
                    error = ratingModel.SpecifyFlowDirection(FlowDirection.Parallel);
                }
                else if (idx == HXRatingSimpleGenericValuesControl.INDEX_COUNTER)
                {
                    error = ratingModel.SpecifyFlowDirection(FlowDirection.Counter);
                }
                else if (idx == HXRatingSimpleGenericValuesControl.INDEX_CROSS)
                {
                    error = ratingModel.SpecifyFlowDirection(FlowDirection.Cross);
                }

                if (error != null)
                {
                    UI.ShowError(error);
                    this.SetFlowDirection(ratingModel.FlowDirection);
                }
            }
        }