コード例 #1
0
ファイル: ASMResultForm.cs プロジェクト: qqj1228/Dyno_Geely
        public void ShowResult(ASMResultData result)
        {
            lblHC5025Limit.Text = result.HC5025Limit;
            lblCO5025Limit.Text = result.CO5025Limit;
            lblNO5025Limit.Text = result.NO5025Limit;
            lblHC5025.Text      = result.HC5025;
            lblCO5025.Text      = result.CO5025;
            lblNO5025.Text      = result.NO5025;
            lblHC5025Evl.Text   = result.HC5025Evl;
            lblCO5025Evl.Text   = result.CO5025Evl;
            lblNO5025Evl.Text   = result.NO5025Evl;

            lblHC2540Limit.Text = result.HC2540Limit;
            lblCO2540Limit.Text = result.CO2540Limit;
            lblNO2540Limit.Text = result.NO2540Limit;
            lblHC2540.Text      = result.HC2540;
            lblCO2540.Text      = result.CO2540;
            lblNO2540.Text      = result.NO2540;
            lblHC2540Evl.Text   = result.HC2540Evl;
            lblCO2540Evl.Text   = result.CO2540Evl;
            lblNO2540Evl.Text   = result.NO2540Evl;

            lblResult.Text = result.Result;

            if (result.HC5025Evl != "合格")
            {
                lblHC5025Evl.BackColor = Color.Red;
            }
            if (result.CO5025Evl != "合格")
            {
                lblCO5025Evl.BackColor = Color.Red;
            }
            if (result.NO5025Evl != "合格")
            {
                lblNO5025Evl.BackColor = Color.Red;
            }
            if (result.HC2540Evl != "合格")
            {
                lblHC2540Evl.BackColor = Color.Red;
            }
            if (result.CO2540Evl != "合格")
            {
                lblCO2540Evl.BackColor = Color.Red;
            }
            if (result.NO2540Evl != "合格")
            {
                lblNO2540Evl.BackColor = Color.Red;
            }
            if (result.Result != "合格")
            {
                lblResult.BackColor = Color.Red;
            }
        }
コード例 #2
0
ファイル: ASMForm.cs プロジェクト: qqj1228/Dyno_Geely
        public ASMForm(string VIN, DynoCmd dynoCmd, MainSetting mainCfg, ModelLocal db, EnvironmentData envData, Logger log)
        {
            InitializeComponent();
            _lastHeight = Height;
            _VIN        = VIN;
            _dynoCmd    = dynoCmd;
            _mainCfg    = mainCfg;
            _db         = db;
            _envData    = envData;
            _log        = log;

            _dtRealTime = new DataTable("ASMRealTime");
            _dtRealTime.Columns.Add("VIN");
            _dtRealTime.Columns.Add("StartTime");
            _dtRealTime.Columns.Add("TimeSN");
            _dtRealTime.Columns.Add("Step");
            _dtRealTime.Columns.Add("TestTime");
            _dtRealTime.Columns.Add("WorkingTime");
            _dtRealTime.Columns.Add("RPM");
            _dtRealTime.Columns.Add("Speed");
            _dtRealTime.Columns.Add("Power");
            _dtRealTime.Columns.Add("HC");
            _dtRealTime.Columns.Add("CO");
            _dtRealTime.Columns.Add("NO");
            _dtRealTime.Columns.Add("CO2");
            _dtRealTime.Columns.Add("O2");
            _dtRealTime.Columns.Add("lambda");
            _dtRealTime.Columns.Add("KH");
            _dtRealTime.Columns.Add("DF");
            _dtRealTime.Columns.Add("HCNor");
            _dtRealTime.Columns.Add("CONor");
            _dtRealTime.Columns.Add("NONor");

            _resultData = new ASMResultData();

            _timer           = new System.Timers.Timer(_mainCfg.RealtimeInterval);
            _timer.Elapsed  += OnTimer;
            _timer.AutoReset = true;

            f_result = new ASMResultForm();
        }
コード例 #3
0
        public void SaveASMResult(string strVIN, DateTime startTime, double runningTime, EnvironmentData envData, ASMResultData resultData)
        {
            DataTable dt = new DataTable("SH_ASMResult");

            dt.Columns.Add("VIN");
            dt.Columns.Add("Temperature");
            dt.Columns.Add("Humidity");
            dt.Columns.Add("Pressure");
            dt.Columns.Add("StartTime");
            dt.Columns.Add("RunningTime");
            dt.Columns.Add("HC5025Limit");
            dt.Columns.Add("CO5025Limit");
            dt.Columns.Add("NO5025Limit");
            dt.Columns.Add("HC5025");
            dt.Columns.Add("CO5025");
            dt.Columns.Add("NO5025");
            dt.Columns.Add("HC5025Evl");
            dt.Columns.Add("CO5025Evl");
            dt.Columns.Add("NO5025Evl");
            dt.Columns.Add("Power5025");
            dt.Columns.Add("HC2540Limit");
            dt.Columns.Add("CO2540Limit");
            dt.Columns.Add("NO2540Limit");
            dt.Columns.Add("HC2540");
            dt.Columns.Add("CO2540");
            dt.Columns.Add("NO2540");
            dt.Columns.Add("HC2540Evl");
            dt.Columns.Add("CO2540Evl");
            dt.Columns.Add("NO2540Evl");
            dt.Columns.Add("Power2540");
            dt.Columns.Add("Result");
            DataRow dr = dt.NewRow();

            dr["VIN"]         = strVIN;
            dr["Temperature"] = envData.Temperature;
            dr["Humidity"]    = envData.Humidity;
            dr["Pressure"]    = envData.Pressure;
            dr["StartTime"]   = startTime;
            dr["RunningTime"] = runningTime;
            dr["HC5025Limit"] = resultData.HC5025Limit;
            dr["CO5025Limit"] = resultData.CO5025Limit;
            dr["NO5025Limit"] = resultData.NO5025Limit;
            dr["HC5025"]      = resultData.HC5025;
            dr["CO5025"]      = resultData.CO5025;
            dr["NO5025"]      = resultData.NO5025;
            dr["HC5025Evl"]   = resultData.HC5025Evl == "合格" ? 1 : 0;
            dr["CO5025Evl"]   = resultData.CO5025Evl == "合格" ? 1 : 0;
            dr["NO5025Evl"]   = resultData.NO5025Evl == "合格" ? 1 : 0;
            dr["HC2540Limit"] = resultData.HC2540Limit;
            dr["CO2540Limit"] = resultData.CO2540Limit;
            dr["NO2540Limit"] = resultData.NO2540Limit;
            dr["HC2540"]      = resultData.HC2540;
            dr["CO2540"]      = resultData.CO2540;
            dr["NO2540"]      = resultData.NO2540;
            dr["HC2540Evl"]   = resultData.HC2540Evl == "合格" ? 1 : 0;
            dr["CO2540Evl"]   = resultData.CO2540Evl == "合格" ? 1 : 0;
            dr["NO2540Evl"]   = resultData.NO2540Evl == "合格" ? 1 : 0;
            dr["Result"]      = resultData.Result == "合格" ? 1 : 0;
            dt.Rows.Add(dr);
            InsertRecords(dt);
        }