private void btForceForm_Click(object sender, EventArgs e) { string str = treeView1.SelectedNode.Text; int i = Convert.ToInt32(str.Length == 5 ? str.Substring(1, 1) : str.Substring(1, 2)); if (i == 1) { FrmBearForceAnalysis1 childFrame = new FrmBearForceAnalysis1(i); childFrame.Show(); } if (i == 2) { FrmBearForceAnalysis2 childFrame = new FrmBearForceAnalysis2(i); childFrame.Show(); } if (i == 3) { FrmBearForceAnalysis3 childFrame = new FrmBearForceAnalysis3(i); childFrame.Show(); } if (i == 4) { Form11 childFrame = new Form11(i); childFrame.Show(); } }