コード例 #1
0
        private void button15_Click(object sender, EventArgs e)                  //验证平行轴定理
        {
            Cal[11] = Convert.ToDouble(Calculate.ExcelToString(path, 1, 25, 2)); //下圆盘直径

            Cal[12] = Convert.ToDouble(Calculate.ExcelToString(path, 1, 26, 2)); //下圆盘质量

            Cal[13] = Convert.ToDouble(Calculate.ExcelToString(path, 1, 27, 2)); //圆柱体质量

            //计算转动惯量理论值
            Calculate.ExcelToString(path, 1, 22, 2, false);

            Calculate.StringToDouble(temp);

            Calculate.Itheory(Cal[13], Cal[15], Convert1);

            //计算转动惯量实验值
            Calculate.ExcelToString(path, 1, 23, 2, false);

            Calculate.StringToDouble(temp);

            Calculate.Ireality(Cal, Convert1);

            //计算百分误差
            Calculate.Ibaifenwucha(iTheoryOutput, iRealityOutput);

            //激活对应按钮控件
            button9.Enabled = true;

            button10.Enabled = true;

            button11.Enabled = true;

            button12.Enabled = true;

            button13.Enabled = true;

            button14.Enabled = true;
        }