private void button1_Click(object sender, EventArgs e) { BearingReaFor BRF = new BearingReaFor(); BRF.Fez = double.Parse(txtFez.Text); BRF.Fey = double.Parse(txtFey.Text); BRF.Ft2 = double.Parse(txtFt.Text); BRF.Fr2 = double.Parse(txtFr.Text); BRF.Fa2 = double.Parse(txtFa.Text); BRF.Fhz = double.Parse(txtFhz.Text); BRF.Fhy = double.Parse(txtFhy.Text); BRF.L1 = double.Parse(txtL1.Text); BRF.L3 = double.Parse(txtL3.Text); BRF.L4 = double.Parse(txtL4.Text); BRF.L5 = double.Parse(txtL5.Text); BRF.r2 = double.Parse(txtR.Text); txtFaz.Text = BRF.BearingFAz4().ToString("f4"); txtFay.Text = BRF.BearingFAy4().ToString("f4"); txtFbz.Text = BRF.BearingFBz4().ToString("f4"); txtFby.Text = BRF.BearingFBy4().ToString("f4"); if (cmbBoxBear.Text == "A固定B浮动") { double a = 0; txtFbx.Text = a.ToString("f4"); txtFax.Text = (-double.Parse(txtFa.Text) - double.Parse(txtFex.Text) - double.Parse(txtFhx.Text)).ToString("f4"); } else { double a = 0; txtFax.Text = a.ToString("f4"); txtFbx.Text = (-double.Parse(txtFa.Text) - double.Parse(txtFex.Text) - double.Parse(txtFhx.Text)).ToString("f4"); } //径向合力 txtFra.Text = Math.Sqrt(Math.Pow(double.Parse(txtFay.Text), 2) + Math.Pow(double.Parse(txtFaz.Text), 2)).ToString("f4"); txtFrb.Text = Math.Sqrt(Math.Pow(double.Parse(txtFby.Text), 2) + Math.Pow(double.Parse(txtFbz.Text), 2)).ToString("f4"); }
private void button1_Click(object sender, EventArgs e) { //轴承支反力计算 BearingReaFor BRF = new BearingReaFor(); BRF.Ft1 = double.Parse(txtFt1.Text); BRF.Fr1 = double.Parse(txtFr1.Text); BRF.Fa1 = double.Parse(txtFa1.Text); BRF.r1 = double.Parse(txtR1.Text); BRF.Ft2 = double.Parse(txtFt2.Text); BRF.Fr2 = double.Parse(txtFr2.Text); BRF.Fa2 = double.Parse(txtFa2.Text); BRF.r2 = double.Parse(txtR2.Text); BRF.L2 = double.Parse(txtL2.Text); BRF.L3 = double.Parse(txtL3.Text); BRF.L4 = double.Parse(txtL4.Text); txtFaz.Text = BRF.BearingFAz2().ToString("f4"); txtFay.Text = BRF.BearingFAy2().ToString("f4"); txtFbz.Text = BRF.BearingFBz2().ToString("f4"); txtFby.Text = BRF.BearingFBy2().ToString("f4"); if (cmbBoxBear.Text == "A固定B浮动") { double a = 0; txtFbx.Text = a.ToString("f4"); txtFax.Text = (double.Parse(txtFa1.Text) - double.Parse(txtFa2.Text)).ToString("f4"); } else { double a = 0; txtFax.Text = a.ToString("f4"); txtFbx.Text = (double.Parse(txtFa1.Text) - double.Parse(txtFa2.Text)).ToString("f4"); } //计算径向合力 txtFra.Text = Math.Sqrt(Math.Pow(double.Parse(txtFaz.Text), 2) + Math.Pow(double.Parse(txtFay.Text), 2)).ToString("f4"); txtFrb.Text = Math.Sqrt(Math.Pow(double.Parse(txtFbz.Text), 2) + Math.Pow(double.Parse(txtFby.Text), 2)).ToString("f4"); }