Beispiel #1
0
 public void ShowResult(TSIResultData result)
 {
     lblHighCOLimit.Text    = result.HighCOLimit.ToString("F");
     lblHighHCLimit.Text    = result.HighHCLimit.ToString("F");
     lblHighCO.Text         = result.HighCO.ToString("F");
     lblHighHC.Text         = result.HighHC.ToString("F");
     lblHighIdleResult.Text = result.HighIdleResult;
     if (result.HighIdleResult != "合格")
     {
         lblHighIdleResult.BackColor = Color.Red;
     }
     lblLowCOLimit.Text    = result.LowCOLimit.ToString("F");
     lblLowHCLimit.Text    = result.LowHCLimit.ToString("F");
     lblLowCO.Text         = result.LowCO.ToString("F");
     lblLowHC.Text         = result.LowHC.ToString("F");
     lblLowIdleResult.Text = result.LowIdleResult;
     if (result.LowIdleResult != "合格")
     {
         lblLowIdleResult.BackColor = Color.Red;
     }
     lblLambdaLimit.Text  = result.LambdaLimit.ToString("F3");
     lblLambda.Text       = result.Lambda.ToString("F3");
     lblLambdaResult.Text = result.LambdaResult;
     if (result.LambdaResult != "合格")
     {
         lblLambdaResult.BackColor = Color.Red;
     }
     lblResult.Text = result.Result;
     if (result.Result != "合格")
     {
         lblResult.BackColor = Color.Red;
     }
 }
Beispiel #2
0
        public TSIForm(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;
            EmissionInfo ei = new EmissionInfo();

            _db.GetEmissionInfoFromVIN(_VIN, ei);
            _RatedRPM = ei.RatedRPM;

            _dtRealTime = new DataTable("TSIRealTime");
            _dtRealTime.Columns.Add("VIN");
            _dtRealTime.Columns.Add("StartTime");
            _dtRealTime.Columns.Add("TimeSN");
            _dtRealTime.Columns.Add("Step");
            _dtRealTime.Columns.Add("RPM");
            _dtRealTime.Columns.Add("CurrentStageTime");
            _dtRealTime.Columns.Add("Lambda");
            _dtRealTime.Columns.Add("OilTemp");
            _dtRealTime.Columns.Add("HResult");
            _dtRealTime.Columns.Add("LResult");

            _resultData = new TSIResultData();

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

            f_result = new TSIResultForm();
        }
Beispiel #3
0
        public void SaveTSIResult(string strVIN, DateTime startTime, double runningTime, EnvironmentData envData, TSIResultData resultData)
        {
            DataTable dt = new DataTable("SH_TSIResult");

            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("HighCOLimit");
            dt.Columns.Add("HighHCLimit");
            dt.Columns.Add("HighCO");
            dt.Columns.Add("HighHC");
            dt.Columns.Add("HighIdleResult");
            dt.Columns.Add("LowCOLimit");
            dt.Columns.Add("LowHCLimit");
            dt.Columns.Add("LowCO");
            dt.Columns.Add("LowHC");
            dt.Columns.Add("LowIdleResult");
            dt.Columns.Add("LambdaLimit");
            dt.Columns.Add("Lambda");
            dt.Columns.Add("LambdaResult");
            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["HighCOLimit"]    = resultData.HighCOLimit;
            dr["HighHCLimit"]    = resultData.HighHCLimit;
            dr["HighCO"]         = resultData.HighCO;
            dr["HighHC"]         = resultData.HighHC;
            dr["HighIdleResult"] = resultData.HighIdleResult == "合格" ? 1 : 0;
            dr["LowCOLimit"]     = resultData.LowCOLimit;
            dr["LowHCLimit"]     = resultData.LowHCLimit;
            dr["LowCO"]          = resultData.LowCO;
            dr["LowHC"]          = resultData.LowHC;
            dr["LowIdleResult"]  = resultData.LowIdleResult == "合格" ? 1 : 0;
            dr["LambdaLimit"]    = resultData.LambdaLimit;
            dr["Lambda"]         = resultData.Lambda;
            dr["LambdaResult"]   = resultData.LambdaResult == "合格" ? 1 : 0;
            dr["Result"]         = resultData.Result == "合格" ? 1 : 0;
            dt.Rows.Add(dr);
            InsertRecords(dt);
        }