WFA_psychometric_chart.Form_Psychrometric_Calculator.radioButton2_CheckedChanged C# (CSharp) Method

radioButton2_CheckedChanged() private method

private radioButton2_CheckedChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            //Imperial unit selected
            unit_temp.Text = "Deg.F";
            unit_ap.Text = "In. Hg";
            unit_dp.Text = "Deg.F";
            unit_Pws.Text = "In. Hg";
            unit_mol_mass_over_mol_wt.Text = "lb/lb";
            unit_mixed_gas_ratio.Text = "lb/lb";
            unit_enthalpy.Text = "Btu/lb";

            try {
                if(flagWhenFirstRadioClick == 1)
                {
                    //We have just come form SI to IP so converstion required

                     double pressureValue = double.Parse(tb_atm_pressure.Text);
                    // double IP_pressure = 33.8639 * Patm;//in hpa now
                    pressureValue =  pressureValue/ 33.8639 ;  // now this is in in Hg
                    tb_atm_pressure.Text = pressureValue.ToString();

                    flagWhenFirstRadioClick = 0;
                    flagForSecondRadioClick = 1;
                }
                 if (tb_atm_pressure.Text == "")
                {
                    tb_atm_pressure.Text = "29.913872";
                }

                textBox1.Text = "";
                textBox2.Text = "";
                textBox4.Text = "";
                textBox8.Text = "";
                textBox10.Text = "";
                textBox11.Text = "";
                textBox9.Text = "";

            }
            catch(Exception ex)
            {

            }
        }