Exemplo n.º 1
0
        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;
                }
            }
        }
Exemplo n.º 2
0
 void CAPEOPEN093.ICapeUnitEdit.Edit()
 {
     ParametersForm.Edit(this);
 }