示例#1
0
        public FALForm(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;
            _MaxRPM   = -1;

            _dtRealTime = new DataTable("FALRealTime");
            _dtRealTime.Columns.Add("VIN");
            _dtRealTime.Columns.Add("StartTime");
            _dtRealTime.Columns.Add("TimeSN");
            _dtRealTime.Columns.Add("Step");
            _dtRealTime.Columns.Add("CurrentStageTime");
            _dtRealTime.Columns.Add("RPM");
            _dtRealTime.Columns.Add("K");

            _resultData = new FALResultData();

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

            f_result = new FALResultForm();
        }
示例#2
0
 public void ShowResult(FALResultData result)
 {
     lblRatedRPM.Text = result.RatedRPM.ToString();
     lblMaxRPM.Text   = result.MaxRPM.ToString();
     lblKLimit.Text   = result.KLimit.ToString("F");
     lblKAvg.Text     = result.KAvg.ToString("F");
     lblK1.Text       = result.K1.ToString("F");
     lblK2.Text       = result.K2.ToString("F");
     lblK3.Text       = result.K3.ToString("F");
     lblResult.Text   = result.Result;
     if (result.Result != "合格")
     {
         lblResult.BackColor = Color.Red;
     }
 }
示例#3
0
        public void SaveFALResult(string strVIN, DateTime startTime, double runningTime, EnvironmentData envData, FALResultData resultData)
        {
            DataTable dt = new DataTable("SH_FALResult");

            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("RatedRPM");
            dt.Columns.Add("MaxRPM");
            dt.Columns.Add("KLimit");
            dt.Columns.Add("KAvg");
            dt.Columns.Add("K1");
            dt.Columns.Add("K2");
            dt.Columns.Add("K3");
            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["RatedRPM"]    = resultData.RatedRPM;
            dr["MaxRPM"]      = resultData.MaxRPM;
            dr["KLimit"]      = resultData.KLimit;
            dr["KAvg"]        = resultData.KAvg;
            dr["K1"]          = resultData.K1;
            dr["K2"]          = resultData.K2;
            dr["K3"]          = resultData.K3;
            dr["Result"]      = resultData.Result == "合格" ? 1 : 0;
            dt.Rows.Add(dr);
            InsertRecords(dt);
        }