Esempio n. 1
0
 private void btInterferenceForm_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));
     double t = 0.0;
     double d = 0.0;
     if (i == 1)
     {
         t = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("动力参数").Element("扭矩").Value);
         d = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("齿轮轴").Element("轴段6直径").Value);
         FrmInterferenceConnection1 childFrame = new FrmInterferenceConnection1(i, t, d);
         childFrame.Show();
     }
     if (i == 2)
     {
         t = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("动力参数").Element("扭矩").Value);
         d = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("齿轮轴").Element("轴段5直径").Value);
         FrmInterferenceConnection1 childFrame = new FrmInterferenceConnection1(i, t, d);
         childFrame.Show();
     }
     if (i == 3)
     {
         t = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("动力参数").Element("扭矩").Value);
         d = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("齿轮轴").Element("轴段5直径").Value);
         FrmInterferenceConnection1 childFrame = new FrmInterferenceConnection1(i, t, d);
         childFrame.Show();
     }
     if (i == 4)
     {
         t = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("受力计算参数").Element("T1").Value);
         d = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("齿轮轴").Element("轴段1直径").Value);
         FrmInterferenceConnection1 childFrame = new FrmInterferenceConnection1(i, t, d);
         childFrame.Show();
     }
 }
Esempio n. 2
0
        private void button3_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 == 4)
            {
                double t = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("受力计算参数").Element("T2").Value);
                double d = double.Parse(SystemConstants.XmlProject.Element("第" + i + "级轴串").Element("齿轮轴").Element("轴段7直径").Value);
                FrmInterferenceConnection1 childFrame = new FrmInterferenceConnection1(i, t, d);
                childFrame.Show();
            }
        }