using Plugin.BurnIn.Model; namespace Plugin.BurnIn.Util { public class CommonCodeParser : ICodeParser { public CellInfo GetCellInfoByCode(string code) { string[] arr = code.Split('-'); if (arr == null || arr.Length != 3) { throw new Exception("扫码格式异常"); } return new CellInfo() { OriginCode = code, MachineName = arr[0], OvenName = arr[1], Index = int.Parse(arr[2]) - 1, }; } public CellInfo GetCellInfoByCode(string model, int columns, int rows, string code) { return GetCellInfoByCode(code); } } }