private void btnExportTxt_Click(object sender, EventArgs e) { AccelerationOffLineCommon.Cit cit = new AccelerationOffLineCommon.Cit(); AccelerationOffLineCommon.Model.CITRequest request = new AccelerationOffLineCommon.Model.CITRequest(); request.path = @"F:\个人文件\铁路\工程代码\车载加速度\data\CitData_160823055537_GJHX.cit"; request.exportTxtPath = @"F:\个人文件\铁路\工程代码\车载加速度\data\123.txt"; request.channelId = 1; string json = JsonConvert.SerializeObject(request); string result = cit.Export(json); }
private void btnCitToTxt2_Click(object sender, EventArgs e) { CITRequest request = new CITRequest(); request.channelNames = new string[] { "M", "AB_Vt_L_11" }; request.sampleCount = 100000; request.exportTxtPath = @"F:\个人文件\铁路\testCit\1111.txt"; request.path = @"F:\个人文件\铁路\testCit\CitData_160424063432_CNGX.cit"; request.path = @"H:\工作文件汇总\铁科院\程序\车载加速度\数据文件\CitData_160424063432_CNGX.cit"; request.exportTxtPath = @"H:\工作文件汇总\铁科院\程序\车载加速度\数据文件\test.txt"; request.startMile = 1; request.endMile = 100; request.isChinese = false; string str = JsonConvert.SerializeObject(request); AccelerationOffLineCommon.Cit cit = new AccelerationOffLineCommon.Cit(); string json = "{\"sampleCount\":\"100000\",\"serviceID\":\"cit2txt\",\"exportTxtPath\":\"d:/user/赵桂东/CitData_160606204011_GJGX.txt\",\"path\":\"d:/user/赵桂东/CitData_160606204011_GJGX.cit\",\"user\":\"赵桂东\",\"channelNames\":[\"M\",\"AB_Vt_L_11\"]}"; string result = cit.Export(str); }