예제 #1
0
 private void 电压值ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         //修改FunctionId
         AppSettingTool.SetFunctionId(1);
         //查询数据是否存在
         if (this._dataSource.Count == 0)
         {
             MessageBox.Show("请获取采集数据,再进行操作");
             return;
         }
         ClearDrawData();
         //刷新数据
         RefreshVData(_dataSource);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
        private void BeginWork()
        {
            //首先对参数进行基本的校验
            if (!ValidateParameter())
            {
                return;
            }
            //对采集的数据进行分析处理
            AnalyzeData(this.myChart, int.Parse(tbNumber.Text), 0, this._allAngle, decimal.Parse(tbOffset.Text));

            this.Invoke(new Action(() =>
            {
                //获取functionid
                var functionId = AppSettingTool.GetFunctionId();
                if (0 == functionId)
                {
                    //加载线性曲线
                    //计算曲线误差
                    var newDataList = TestPoint.ComputeLineErrorValue(_dataSource, _uMax, _uMin);
                    //删除数据
                    ClearDrawData();
                    //加载数据
                    RefreshLineErrorData(newDataList);
                    //打印报表数据
                    ExportData(_dataSource);
                }
                if (1 == functionId)
                {
                    //加载电压曲线
                    ClearDrawData();
                    //刷新数据
                    RefreshVData(_dataSource);
                    //打印报表
                    ExportData(_dataSource);
                }
                MessageBox.Show("采集完成");
            }));
        }
예제 #3
0
 private void 线性度曲线ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         //修改FunctionId
         AppSettingTool.SetFunctionId(0);
         //查询数据是否存在
         if (this._dataSource.Count == 0)
         {
             MessageBox.Show("请获取采集数据,再进行操作");
             return;
         }
         //计算曲线误差
         // var newDataList = TestPoint.ComputeLineErrorValue(_dataSource,_uMax,_uMin);
         //删除数据
         ClearDrawData();
         //加载数据
         RefreshLineErrorData(_dataSource);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }