using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using Plugin.TestResult_WPF.Model;
|
|
namespace Plugin.TestResult_WPF.Util
|
{
|
public class CommonCodeParser
|
{
|
public CellInfo GetCellInfoByCode(string code)
|
{
|
string[] arr = code.Split('-');
|
if (arr == null || arr.Length != 3)
|
{
|
throw new Exception("扫码格式异常");
|
}
|
return new CellInfo()
|
{
|
MachineName = arr[0],
|
OvenName = arr[1],
|
Index = int.Parse(arr[2]) - 1,
|
};
|
}
|
}
|
}
|