private void ConvertFullName(string fullName) { //%y-%M/%M-%d/%y%M%d%h%m%s%S-%22-%09.jpg //2013-01/01-06/20130106152730110-PZC2AW01800060-浙APJ896.jpg //yyyyMMddHHmmssfff-SBBH-HPHM.jpg try { FileInfo fileInfo = new FileInfo(fullName); var keys = fileInfo.Name.Split('-'); var name = keys[0]; var sj = keys[1].Substring(0, keys[1].Length - 4); var plateInfo = new PlateInfo { HPHM = sj == "无牌" ? "-" : sj }; new CardAnnalSvr().FTPAnnal(fullName, plateInfo.HPHM, plateInfo.SBBH); if (OnCallback != null) { OnCallback(plateInfo); } //输出格式化完成后的图片路径 //logger.Info(fullName); } catch (Exception ex) { File.Delete(fullName); //logger.Error(ex); } }
static void p_OnCallback(FTP.PlateInfo obj) { }