private void button5_Click(object sender, EventArgs e)
        {
            this.Close();
            var frm = new FrmGearCalculate();

            frm.Show();
        }
        private void btSaveData1_Click(object sender, EventArgs e)
        {
            var element = SystemConstants.XmlProject.Element("齿轮参数计算");

            if (element != null)
            {
                XElement xElement = element.Element("第" + SystemConstants.SingleCalcultGrade + "级齿轮参数").Element("输入参数");
                if (xElement != null)
                {
                    xElement.Element("a").Value     = txtZXJ.Text;
                    xElement.Element("Mn").Value    = txtMS.Text;
                    xElement.Element("Z1").Value    = txtXCS.Text;
                    xElement.Element("Z2").Value    = txtDCS.Text;
                    xElement.Element("ha").Value    = txtHa.Text;
                    xElement.Element("c").Value     = txtC.Text;
                    xElement.Element("B1").Value    = txtLXJ.Text;
                    xElement.Element("alpha").Value = txtCXJ.Text;
                    xElement.Element("x1").Value    = txtXBW.Text;
                    xElement.Element("B").Value     = txtB.Text;
                    SystemConstants.XmlProject.Save(SystemConstants.StrProjectPath + @"\减速器.xml");
                }
            }

            //IEnumerable<XElement> xe = SystemConstants.XmlProject.Elements("齿轮参数计算");
            //XElement.Load(@"D:\减速器设计系统\齿轮计算参数.xml"));
            //IEnumerable<XElement> elements = from a in xe.Elements("第一级齿轮参数").Elements("输入参数")                               select a;

            //xe.Save(@"D:\减速器设计系统\齿轮计算参数.xml");
            //this.Parent.Show();
            this.Close();

            var frm = new FrmGearCalculate();

            frm.Show();
        }
示例#3
0
 public void GearCalculate()
 {
     FrmGearCalculate childFrame = new FrmGearCalculate();
     childFrame.Show();
 }
        private void btSaveData1_Click(object sender, EventArgs e)
        {
            var element = SystemConstants.XmlProject.Element("齿轮参数计算");
            if (element != null)
            {
                XElement xElement =element.Element("第" + SystemConstants.SingleCalcultGrade + "级齿轮参数").Element("输入参数");
                if (xElement != null)
                {
                    xElement.Element("a").Value = txtZXJ.Text;
                    xElement.Element("Mn").Value = txtMS.Text;
                    xElement.Element("Z1").Value = txtXCS.Text;
                    xElement.Element("Z2").Value = txtDCS.Text;
                    xElement.Element("ha").Value = txtHa.Text;
                    xElement.Element("c").Value = txtC.Text;
                    xElement.Element("B1").Value = txtLXJ.Text;
                    xElement.Element("alpha").Value = txtCXJ.Text;
                    xElement.Element("x1").Value = txtXBW.Text;
                    xElement.Element("B").Value = txtB.Text;
                    SystemConstants.XmlProject.Save(SystemConstants.StrProjectPath + @"\减速器.xml");
                }
            }

            //IEnumerable<XElement> xe = SystemConstants.XmlProject.Elements("齿轮参数计算");
            //XElement.Load(@"D:\减速器设计系统\齿轮计算参数.xml"));
            //IEnumerable<XElement> elements = from a in xe.Elements("第一级齿轮参数").Elements("输入参数")                               select a;

            //xe.Save(@"D:\减速器设计系统\齿轮计算参数.xml");
            //this.Parent.Show();
            this.Close();

            var frm = new FrmGearCalculate();
            frm.Show();
        }
 private void button5_Click(object sender, EventArgs e)
 {
     this.Close();
     var frm = new FrmGearCalculate();
     frm.Show();
 }
示例#6
0
        public void GearCalculate()
        {
            FrmGearCalculate childFrame = new FrmGearCalculate();

            childFrame.Show();
        }