public static void Edit(ExchangerUnit unit) { if (sDefaultForm == null) { sDefaultForm = new ParametersForm(); sDefaultForm.tbValue.Text = "350"; } DialogResult zResult = sDefaultForm.ShowDialog(); if (zResult == DialogResult.OK) { switch (sDefaultForm.cbType.SelectedItem.ToString()) { case ("Hot Oulet Temperature"): unit.Operation = ExchangerUnit.OperationType.HotOuttetTemp; unit.ParameterValue = Convert.ToDouble(sDefaultForm.tbValue.Text); break; case ("Cold Outlet Temperature"): unit.Operation = ExchangerUnit.OperationType.ColdOutletTemp; unit.ParameterValue = Convert.ToDouble(sDefaultForm.tbValue.Text); break; case ("Duty"): unit.Operation = ExchangerUnit.OperationType.Duty; unit.ParameterValue = Convert.ToDouble(sDefaultForm.tbValue.Text); break; } } }
void CAPEOPEN093.ICapeUnitEdit.Edit() { ParametersForm.Edit(this); }