Пример #1
0
 private void init_csv(string carID)
 {
     vmas_csv = new CSVcontrol.CSVHelper();
     vmas_csv.CreateCsv(@"C:\jcdatatxt\" + carID + ".csv");
     vmas_csv.openCsv();
     vmas_csv.writeField(1, 1, "全程时序");
     vmas_csv.writeField(1, 2, "时序类别");
     vmas_csv.writeField(1, 3, "采样时序");
     vmas_csv.writeField(1, 4, "HC实时值");
     vmas_csv.writeField(1, 5, "CO实时值");
     vmas_csv.writeField(1, 6, "CO2实时值");
     vmas_csv.writeField(1, 7, "NO实时值");
     vmas_csv.writeField(1, 8, "环境O2浓度");
     vmas_csv.writeField(1, 9, "分析仪O2实时值");
     vmas_csv.writeField(1, 10, "流量计O2实时值");
     vmas_csv.writeField(1, 11, "HC排放质量");
     vmas_csv.writeField(1, 12, "CO排放质量");
     vmas_csv.writeField(1, 13, "NO排放质量");
     vmas_csv.writeField(1, 14, "标准时速");
     vmas_csv.writeField(1, 15, "实时车速");
     vmas_csv.writeField(1, 16, "加载功率");
     vmas_csv.writeField(1, 17, "环境温度");
     vmas_csv.writeField(1, 18, "相对湿度");
     vmas_csv.writeField(1, 19, "大气压力");
     vmas_csv.writeField(1, 20, "流量计温度");
     vmas_csv.writeField(1, 21, "流量计压力");
     vmas_csv.writeField(1, 22, "实际体积流量");
     vmas_csv.writeField(1, 23, "标准体积流量");
     vmas_csv.writeField(1, 24, "湿度修正系数");
     vmas_csv.writeField(1, 25, "稀释修正系数");
     vmas_csv.writeField(1, 26, "稀释比");
     vmas_csv.writeField(1, 27, "分析仪管路压力");
     vmas_csv.writeField(1, 28, "分析仪实时流量");
     vmas_csv.closeCsv();
 }
Пример #2
0
 public bool writeSdsDataSeconds(sdsDataSeconds sdsdataseconds)
 {
     try
     {
         init_csv(sdsdataseconds.CarID);
         jzjs_csv.openCsv();
         for (int i = 1; i < sdsdataseconds.Gksj; i++)
         {
             jzjs_csv.writeField(i + 1, 1, sdsdataseconds.Qcsx[i - 1]);
             jzjs_csv.writeField(i + 1, 2, sdsdataseconds.Sxnb[i - 1]);
             jzjs_csv.writeField(i + 1, 3, sdsdataseconds.Cysx[i - 1].ToString("0"));
             jzjs_csv.writeField(i + 1, 4, sdsdataseconds.Hc[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 5, sdsdataseconds.Co[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 6, sdsdataseconds.O2[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 7, sdsdataseconds.Co2[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 8, sdsdataseconds.Λ[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 9, sdsdataseconds.Zs[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 10, sdsdataseconds.Yw[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 11, sdsdataseconds.Wd[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 12, sdsdataseconds.Sd[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 13, sdsdataseconds.Dqy[i - 1].ToString("0.00"));
         }
         jzjs_csv.closeCsv();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #3
0
 private void init_csv(string carID)
 {
     jzjs_csv = new CSVcontrol.CSVHelper();
     jzjs_csv.CreateCsv(@"C:\jcdatatxt\" + carID + ".csv");
     jzjs_csv.openCsv();
     jzjs_csv.writeField(1, 1, "全程时序");
     jzjs_csv.writeField(1, 2, "时序类别");
     jzjs_csv.writeField(1, 3, "采样时序");
     jzjs_csv.writeField(1, 4, "车速");
     jzjs_csv.writeField(1, 5, "功率");
     jzjs_csv.writeField(1, 6, "光吸收系数K");
     jzjs_csv.closeCsv();
 }
Пример #4
0
 public bool writeVmasDataSeconds(vmasDataSeconds vmasdataseconds)
 {
     try
     {
         init_csv(vmasdataseconds.CarID);
         vmas_csv.openCsv();
         for (int i = 2; i <= 196; i++)
         {
             vmas_csv.writeField(i, 1, vmasdataseconds.Qcsx[i - 2]);
             vmas_csv.writeField(i, 2, vmasdataseconds.Sxnb[i - 2]);
             vmas_csv.writeField(i, 3, vmasdataseconds.Cysx[i - 2].ToString("0"));
             vmas_csv.writeField(i, 4, vmasdataseconds.Hcssz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 5, vmasdataseconds.Cossz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 6, vmasdataseconds.Co2ssz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 7, vmasdataseconds.Nossz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 8, vmasdataseconds.Hjo2nd[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 9, vmasdataseconds.Fxyo2ssz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 10, vmasdataseconds.Lljo2ssz[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 11, vmasdataseconds.Hcpfzl[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 12, vmasdataseconds.Copfzl[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 13, vmasdataseconds.Nopfzl[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 14, vmasdataseconds.Bzss[i - 2].ToString("0.0"));
             vmas_csv.writeField(i, 15, vmasdataseconds.Sscs[i - 2].ToString("0.0"));
             vmas_csv.writeField(i, 16, vmasdataseconds.Jzgl[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 17, vmasdataseconds.Hjwd[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 18, vmasdataseconds.Xdsd[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 19, vmasdataseconds.Dqyl[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 20, vmasdataseconds.Lljwd[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 21, vmasdataseconds.Lljyl[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 22, vmasdataseconds.Sjtjll[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 23, vmasdataseconds.Bztjll[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 24, vmasdataseconds.Sdxzxs[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 25, vmasdataseconds.Xsxzxs[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 26, vmasdataseconds.Xsb[i - 2].ToString("0.000"));
             vmas_csv.writeField(i, 27, vmasdataseconds.Fxyglyl[i - 2].ToString("0.00"));
             vmas_csv.writeField(i, 28, vmasdataseconds.Fxyssll[i - 2].ToString("0.00"));
         }
         vmas_csv.closeCsv();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #5
0
 private void init_csv(string carID)
 {
     jzjs_csv = new CSVcontrol.CSVHelper();
     jzjs_csv.CreateCsv(@"C:\jcdatatxt\" + carID + ".csv");
     jzjs_csv.openCsv();
     jzjs_csv.writeField(1, 1, "全程时序");
     jzjs_csv.writeField(1, 2, "时序类别");
     jzjs_csv.writeField(1, 3, "采样时序");
     jzjs_csv.writeField(1, 4, "HC");
     jzjs_csv.writeField(1, 5, "CO");
     jzjs_csv.writeField(1, 6, "O2");
     jzjs_csv.writeField(1, 7, "CO2");
     jzjs_csv.writeField(1, 8, "过量空气系数");
     jzjs_csv.writeField(1, 9, "转速");
     jzjs_csv.writeField(1, 10, "油温");
     jzjs_csv.writeField(1, 11, "环境温度");
     jzjs_csv.writeField(1, 12, "相对湿度");
     jzjs_csv.writeField(1, 13, "大气压力");
     jzjs_csv.closeCsv();
 }
Пример #6
0
 public bool writeJzjsDataSeconds(jzjsDataSeconds jzjsdataseconds)
 {
     try
     {
         init_csv(jzjsdataseconds.CarID);
         jzjs_csv.openCsv();
         for (int i = 1; i < jzjsdataseconds.Gksj; i++)
         {
             jzjs_csv.writeField(i + 1, 1, jzjsdataseconds.Qcsx[i - 1]);
             jzjs_csv.writeField(i + 1, 2, jzjsdataseconds.Sxnb[i - 1]);
             jzjs_csv.writeField(i + 1, 3, jzjsdataseconds.Cysx[i - 1].ToString("0"));
             jzjs_csv.writeField(i + 1, 4, jzjsdataseconds.Cs[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 5, jzjsdataseconds.Gl[i - 1].ToString("0.00"));
             jzjs_csv.writeField(i + 1, 6, jzjsdataseconds.Gxsxs[i - 1].ToString("0.00"));
         }
         jzjs_csv.closeCsv();
         return(true);
     }
     catch
     {
         return(false);
     }
 }