Esempio n. 1
0
 private void comboBoxTubeLayout_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (!this.inConstruction)
     {
         ErrorMessage error = null;
         HXRatingModelShellAndTube shellAndTubeRating = this.heatExchanger.CurrentRatingModel as HXRatingModelShellAndTube;
         int idx = this.comboBoxTubeLayout.SelectedIndex;
         if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_INLINE_SQUARE)
         {
             error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.InlineSquare);
         }
         else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_ROTATED_SQUARE)
         {
             error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.RotatedSquare);
         }
         else if (idx == HXRatingShellAndTubeBellDelawareValuesControl.INDEX_TRIANGULAR)
         {
             error = shellAndTubeRating.SpecifyTubeLayout(TubeLayout.Triangular);
         }
         if (error != null)
         {
             UI.ShowError(error);
             this.SetTubeLayout(shellAndTubeRating.TubeLayout);
         }
     }
 }