private void heatExchanger_SolveComplete(object sender, SolveState solveState) { HXRatingModel ratingModel = (sender as HeatExchanger).CurrentRatingModel as HXRatingModel; FlowDirectionType flowDirection = ratingModel.FlowDirection; this.SetFlowDirection(flowDirection); }
public HXRatingSimpleGenericEditor(HeatExchangerControl heatExchangerCtrl) { // // Required for Windows Form Designer support // InitializeComponent(); this.inConstruction = true; this.Text = "Simple Generic Rating: " + heatExchangerCtrl.HeatExchanger.Name; this.heatExchanger = heatExchangerCtrl.HeatExchanger; HXRatingModel ratingModel = this.heatExchanger.CurrentRatingModel as HXRatingModel; this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect; this.hxRatingSimpleGeneric2LabelsControl.Visible = this.checkBoxIncludeWallEffect.Checked; this.hxRatingSimpleGeneric2ValuesControl.Visible = this.checkBoxIncludeWallEffect.Checked; this.hxRatingSimpleGenericLabelsControl.InitializeVariableLabels(heatExchangerCtrl.HeatExchanger.CurrentRatingModel); this.hxRatingSimpleGenericValuesControl.InitializeTheUI(heatExchangerCtrl.Flowsheet, heatExchangerCtrl.HeatExchanger); this.hxRatingSimpleGeneric2LabelsControl.InitializeVariableLabels(heatExchangerCtrl.HeatExchanger.CurrentRatingModel); this.hxRatingSimpleGeneric2ValuesControl.InitializeVariableTextBoxes(heatExchangerCtrl.Flowsheet, heatExchangerCtrl.HeatExchanger.CurrentRatingModel); this.heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete); this.inConstruction = false; }
private void comboBoxFlowDirection_SelectedIndexChanged(object sender, System.EventArgs e) { if (!this.inConstruction) { ErrorMessage error = null; HXRatingModel ratingModel = heatExchanger.CurrentRatingModel as HXRatingModel; int idx = this.comboBoxFlowDirection.SelectedIndex; if (idx == HXRatingSimpleGenericValuesControl.INDEX_PARALLEL) { error = ratingModel.SpecifyFlowDirection(FlowDirectionType.Parallel); } else if (idx == HXRatingSimpleGenericValuesControl.INDEX_COUNTER) { error = ratingModel.SpecifyFlowDirection(FlowDirectionType.Counter); } else if (idx == HXRatingSimpleGenericValuesControl.INDEX_CROSS) { error = ratingModel.SpecifyFlowDirection(FlowDirectionType.Cross); } if (error != null) { UI.ShowError(error); this.SetFlowDirection(ratingModel.FlowDirection); } } }
public HXRating2ValuesControl(Flowsheet flowsheet, HeatExchanger heatExchanger) { // NOTE: this constructor is not used InitializeComponent(); HXRatingModel ratingModel = heatExchanger.CurrentRatingModel as HXRatingModel; this.InitializeVariableTextBoxes(flowsheet, ratingModel); }
public void InitializeVariableLabels(HXRatingModel rating) { this.labelColdSideHeatTransferCoefficient.InitializeVariable(rating.ColdSideHeatTransferCoefficient); this.labelHotSideHeatTransferCoefficient.InitializeVariable(rating.HotSideHeatTransferCoefficient); this.labelColdSideFoulingFactor.InitializeVariable(rating.ColdSideFoulingFactor); this.labelHotSideFoulingFactor.InitializeVariable(rating.HotSideFoulingFactor); this.labelTotalHeatTransferCoefficient.InitializeVariable(rating.TotalHeatTransferCoefficient); this.labelTotalHeatTransferArea.InitializeVariable(rating.TotalHeatTransferArea); this.labelNumberOfHeatTransferUnits.InitializeVariable(rating.NumberOfHeatTransferUnits); this.labelExchangerEffectiveness.InitializeVariable(rating.ExchangerEffectiveness); }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModel rating) { this.textBoxNumberOfHeatTransferUnits.InitializeVariable(flowsheet, rating.NumberOfHeatTransferUnits); this.textBoxTotalHeatTransferArea.InitializeVariable(flowsheet, rating.TotalHeatTransferArea); this.textBoxHotSideFoulingFactor.InitializeVariable(flowsheet, rating.HotSideFoulingFactor); this.textBoxColdSideFoulingFactor.InitializeVariable(flowsheet, rating.ColdSideFoulingFactor); this.textBoxHotSideHeatTransferCoefficient.InitializeVariable(flowsheet, rating.HotSideHeatTransferCoefficient); this.textBoxExchangerEffectiveness.InitializeVariable(flowsheet, rating.ExchangerEffectiveness); this.textBoxTotalHeatTransferCoefficient.InitializeVariable(flowsheet, rating.TotalHeatTransferCoefficient); this.textBoxColdSideHeatTransferCoefficient.InitializeVariable(flowsheet, rating.ColdSideHeatTransferCoefficient); }
public void InitializeTheUI(Flowsheet flowsheet, HeatExchanger heatExchanger) { this.inConstruction = true; this.heatExchanger = heatExchanger; HXRatingModel ratingModel = heatExchanger.CurrentRatingModel as HXRatingModel; this.InitializeVariableTextBoxes(flowsheet, ratingModel); heatExchanger.SolveComplete += new SolveCompleteEventHandler(heatExchanger_SolveComplete); this.comboBoxFlowDirection.SelectedIndex = -1; this.inConstruction = false; this.SetFlowDirection(ratingModel.FlowDirection); }
private void checkBoxIncludeWallEffect_CheckedChanged(object sender, System.EventArgs e) { this.hxRating2LabelsControl.Visible = this.checkBoxIncludeWallEffect.Checked; this.hxRating2ValuesControl.Visible = this.checkBoxIncludeWallEffect.Checked; if (!this.inConstruction) { HXRatingModel ratingModel = heatExchanger.CurrentRatingModel as HXRatingModel; ErrorMessage error = ratingModel.SpecifyIncludeWallEffect(this.checkBoxIncludeWallEffect.Checked); if (error != null) { UI.ShowError(error); } } }
public void InitializeVariableLabels(HXRatingModel rating) { this.labelWallThermalConductivity.InitializeVariable(rating.WallThermalConductivity); this.labelWallThickness.InitializeVariable(rating.WallThickness); }
public HXRating2LabelsControl(HXRatingModel rating) { // NOTE: this constructor is not used InitializeComponent(); this.InitializeVariableLabels(rating); }
private void heatExchanger_SolveComplete(object sender, SolveState solveState) { HXRatingModel ratingModel = (sender as HeatExchanger).CurrentRatingModel as HXRatingModel; this.checkBoxIncludeWallEffect.Checked = ratingModel.IncludeWallEffect; }
public void InitializeVariableTextBoxes(Flowsheet flowsheet, HXRatingModel rating) { this.textBoxWallThermalConductivity.InitializeVariable(flowsheet, rating.WallThermalConductivity); this.textBoxWallThickness.InitializeVariable(flowsheet, rating.WallThickness); }